<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>libyubihsm: yubihsm.h File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">libyubihsm
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#nested-classes">Data Structures</a> &#124;
<a href="#define-members">Macros</a> &#124;
<a href="#typedef-members">Typedefs</a> &#124;
<a href="#enum-members">Enumerations</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">yubihsm.h File Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Everything you need to establish a connection to the YubiHSM 2 and use its functions.  
<a href="#details">More...</a></p>

<p><a href="yubihsm_8h_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Data Structures</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structyh__capabilities.html">yh_capabilities</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Capabilities representation.  <a href="structyh__capabilities.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structyh__log__entry.html">yh_log_entry</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Logging struct as returned by device.  <a href="structyh__log__entry.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structyh__object__descriptor.html">yh_object_descriptor</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft">&#160;</td><td class="mdescRight">Object descriptor.  <a href="structyh__object__descriptor.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:afbeafba1cc9582217f57f058a7efd200"><td class="memItemLeft" align="right" valign="top"><a id="afbeafba1cc9582217f57f058a7efd200"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="yubihsm_8h.html#afbeafba1cc9582217f57f058a7efd200">YH_CONTEXT_LEN</a>&#160;&#160;&#160;16</td></tr>
<tr class="memdesc:afbeafba1cc9582217f57f058a7efd200"><td class="mdescLeft">&#160;</td><td class="mdescRight">Length of context array for authentication. <br /></td></tr>
<tr class="separator:afbeafba1cc9582217f57f058a7efd200"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a397824bc3574858c6c4502b81f7fae31"><td class="memItemLeft" align="right" valign="top"><a id="a397824bc3574858c6c4502b81f7fae31"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="yubihsm_8h.html#a397824bc3574858c6c4502b81f7fae31">YH_HOST_CHAL_LEN</a>&#160;&#160;&#160;8</td></tr>
<tr class="memdesc:a397824bc3574858c6c4502b81f7fae31"><td class="mdescLeft">&#160;</td><td class="mdescRight">Length of host challenge for authentication. <br /></td></tr>
<tr class="separator:a397824bc3574858c6c4502b81f7fae31"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a706bd8e7adf0de85e6cfb0efc8981d3f"><td class="memItemLeft" align="right" valign="top"><a id="a706bd8e7adf0de85e6cfb0efc8981d3f"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="yubihsm_8h.html#a706bd8e7adf0de85e6cfb0efc8981d3f">YH_MSG_BUF_SIZE</a>&#160;&#160;&#160;2048</td></tr>
<tr class="memdesc:a706bd8e7adf0de85e6cfb0efc8981d3f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Maximum length of message buffer. <br /></td></tr>
<tr class="separator:a706bd8e7adf0de85e6cfb0efc8981d3f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac2737b2a34c26d0258d25e34993df391"><td class="memItemLeft" align="right" valign="top"><a id="ac2737b2a34c26d0258d25e34993df391"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="yubihsm_8h.html#ac2737b2a34c26d0258d25e34993df391">YH_KEY_LEN</a>&#160;&#160;&#160;16</td></tr>
<tr class="memdesc:ac2737b2a34c26d0258d25e34993df391"><td class="mdescLeft">&#160;</td><td class="mdescRight">Length of authentication keys. <br /></td></tr>
<tr class="separator:ac2737b2a34c26d0258d25e34993df391"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aae8b43483bd9f96455feb8055eda5985"><td class="memItemLeft" align="right" valign="top"><a id="aae8b43483bd9f96455feb8055eda5985"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="yubihsm_8h.html#aae8b43483bd9f96455feb8055eda5985">YH_VID</a>&#160;&#160;&#160;0x1050</td></tr>
<tr class="memdesc:aae8b43483bd9f96455feb8055eda5985"><td class="mdescLeft">&#160;</td><td class="mdescRight">Device vendor ID. <br /></td></tr>
<tr class="separator:aae8b43483bd9f96455feb8055eda5985"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a33d2946f7c95cc44ac153d0013b6b203"><td class="memItemLeft" align="right" valign="top"><a id="a33d2946f7c95cc44ac153d0013b6b203"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="yubihsm_8h.html#a33d2946f7c95cc44ac153d0013b6b203">YH_PID</a>&#160;&#160;&#160;0x0030</td></tr>
<tr class="memdesc:a33d2946f7c95cc44ac153d0013b6b203"><td class="mdescLeft">&#160;</td><td class="mdescRight">Device product ID. <br /></td></tr>
<tr class="separator:a33d2946f7c95cc44ac153d0013b6b203"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a158034949fa1cab24db476604d4dabd9"><td class="memItemLeft" align="right" valign="top"><a id="a158034949fa1cab24db476604d4dabd9"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="yubihsm_8h.html#a158034949fa1cab24db476604d4dabd9">YH_CMD_RESP_FLAG</a>&#160;&#160;&#160;0x80</td></tr>
<tr class="memdesc:a158034949fa1cab24db476604d4dabd9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Response flag for commands. <br /></td></tr>
<tr class="separator:a158034949fa1cab24db476604d4dabd9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a331b70d37ded99854638ff5ef0ca9735"><td class="memItemLeft" align="right" valign="top"><a id="a331b70d37ded99854638ff5ef0ca9735"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="yubihsm_8h.html#a331b70d37ded99854638ff5ef0ca9735">YH_MAX_ITEMS_COUNT</a>&#160;&#160;&#160;256</td></tr>
<tr class="memdesc:a331b70d37ded99854638ff5ef0ca9735"><td class="mdescLeft">&#160;</td><td class="mdescRight">Max items the device may hold. <br /></td></tr>
<tr class="separator:a331b70d37ded99854638ff5ef0ca9735"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:add4e5963a36bd6c9b06c717d705f4c2f"><td class="memItemLeft" align="right" valign="top"><a id="add4e5963a36bd6c9b06c717d705f4c2f"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="yubihsm_8h.html#add4e5963a36bd6c9b06c717d705f4c2f">YH_MAX_SESSIONS</a>&#160;&#160;&#160;16</td></tr>
<tr class="memdesc:add4e5963a36bd6c9b06c717d705f4c2f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Max sessions the device may hold. <br /></td></tr>
<tr class="separator:add4e5963a36bd6c9b06c717d705f4c2f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0ea7ce876208181fac18ea30ea8f1c82"><td class="memItemLeft" align="right" valign="top"><a id="a0ea7ce876208181fac18ea30ea8f1c82"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="yubihsm_8h.html#a0ea7ce876208181fac18ea30ea8f1c82">YH_DEFAULT_ENC_KEY</a>&#160;&#160;&#160;&quot;\x09\x0b\x47\xdb\xed\x59\x56\x54\x90\x1d\xee\x1c\xc6\x55\xe4\x20&quot;</td></tr>
<tr class="memdesc:a0ea7ce876208181fac18ea30ea8f1c82"><td class="mdescLeft">&#160;</td><td class="mdescRight">Default encryption key. <br /></td></tr>
<tr class="separator:a0ea7ce876208181fac18ea30ea8f1c82"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab5837c6206d27211ffd346ad9d72706a"><td class="memItemLeft" align="right" valign="top"><a id="ab5837c6206d27211ffd346ad9d72706a"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="yubihsm_8h.html#ab5837c6206d27211ffd346ad9d72706a">YH_DEFAULT_MAC_KEY</a>&#160;&#160;&#160;&quot;\x59\x2f\xd4\x83\xf7\x59\xe2\x99\x09\xa0\x4c\x45\x05\xd2\xce\x0a&quot;</td></tr>
<tr class="memdesc:ab5837c6206d27211ffd346ad9d72706a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Default MAC key. <br /></td></tr>
<tr class="separator:ab5837c6206d27211ffd346ad9d72706a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac850296655b387c6fd54492144507de1"><td class="memItemLeft" align="right" valign="top"><a id="ac850296655b387c6fd54492144507de1"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="yubihsm_8h.html#ac850296655b387c6fd54492144507de1">YH_DEFAULT_PASSWORD</a>&#160;&#160;&#160;&quot;password&quot;</td></tr>
<tr class="memdesc:ac850296655b387c6fd54492144507de1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Default authentication key password. <br /></td></tr>
<tr class="separator:ac850296655b387c6fd54492144507de1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a73df2dc900a9511ee5d9fd99d75fd0ba"><td class="memItemLeft" align="right" valign="top"><a id="a73df2dc900a9511ee5d9fd99d75fd0ba"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="yubihsm_8h.html#a73df2dc900a9511ee5d9fd99d75fd0ba">YH_DEFAULT_SALT</a>&#160;&#160;&#160;&quot;Yubico&quot;</td></tr>
<tr class="memdesc:a73df2dc900a9511ee5d9fd99d75fd0ba"><td class="mdescLeft">&#160;</td><td class="mdescRight">Salt to be used for PBKDF2 key derivation. <br /></td></tr>
<tr class="separator:a73df2dc900a9511ee5d9fd99d75fd0ba"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0d85afa29b16c45d7de642c1313278f3"><td class="memItemLeft" align="right" valign="top"><a id="a0d85afa29b16c45d7de642c1313278f3"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="yubihsm_8h.html#a0d85afa29b16c45d7de642c1313278f3">YH_DEFAULT_ITERS</a>&#160;&#160;&#160;10000</td></tr>
<tr class="memdesc:a0d85afa29b16c45d7de642c1313278f3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Number of iterations for PBKDF2 key derivation. <br /></td></tr>
<tr class="separator:a0d85afa29b16c45d7de642c1313278f3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad3c904849d17cae0a6f426e8007731d7"><td class="memItemLeft" align="right" valign="top"><a id="ad3c904849d17cae0a6f426e8007731d7"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="yubihsm_8h.html#ad3c904849d17cae0a6f426e8007731d7">YH_CAPABILITIES_LEN</a>&#160;&#160;&#160;8</td></tr>
<tr class="memdesc:ad3c904849d17cae0a6f426e8007731d7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Length of capabilities array. <br /></td></tr>
<tr class="separator:ad3c904849d17cae0a6f426e8007731d7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae10a65a4b5dfaac7c3d64c1ec7b99e82"><td class="memItemLeft" align="right" valign="top"><a id="ae10a65a4b5dfaac7c3d64c1ec7b99e82"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="yubihsm_8h.html#ae10a65a4b5dfaac7c3d64c1ec7b99e82">YH_MAX_LOG_ENTRIES</a>&#160;&#160;&#160;64</td></tr>
<tr class="memdesc:ae10a65a4b5dfaac7c3d64c1ec7b99e82"><td class="mdescLeft">&#160;</td><td class="mdescRight">Max log entries the device may hold. <br /></td></tr>
<tr class="separator:ae10a65a4b5dfaac7c3d64c1ec7b99e82"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a431f8b753552a8b2f5f980e871b6d019"><td class="memItemLeft" align="right" valign="top"><a id="a431f8b753552a8b2f5f980e871b6d019"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="yubihsm_8h.html#a431f8b753552a8b2f5f980e871b6d019">YH_OBJ_LABEL_LEN</a>&#160;&#160;&#160;40</td></tr>
<tr class="memdesc:a431f8b753552a8b2f5f980e871b6d019"><td class="mdescLeft">&#160;</td><td class="mdescRight">Max length of object labels. <br /></td></tr>
<tr class="separator:a431f8b753552a8b2f5f980e871b6d019"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aedf3b950c50f82299eddf54d0338dd60"><td class="memItemLeft" align="right" valign="top"><a id="aedf3b950c50f82299eddf54d0338dd60"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="yubihsm_8h.html#aedf3b950c50f82299eddf54d0338dd60">YH_MAX_DOMAINS</a>&#160;&#160;&#160;16</td></tr>
<tr class="memdesc:aedf3b950c50f82299eddf54d0338dd60"><td class="mdescLeft">&#160;</td><td class="mdescRight">Max number of domains. <br /></td></tr>
<tr class="separator:aedf3b950c50f82299eddf54d0338dd60"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a289ca46f5ef481980f0fad98d727e87a"><td class="memItemLeft" align="right" valign="top"><a id="a289ca46f5ef481980f0fad98d727e87a"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="yubihsm_8h.html#a289ca46f5ef481980f0fad98d727e87a">YH_LOG_DIGEST_SIZE</a>&#160;&#160;&#160;16</td></tr>
<tr class="memdesc:a289ca46f5ef481980f0fad98d727e87a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Size that the log digest is truncated to. <br /></td></tr>
<tr class="separator:a289ca46f5ef481980f0fad98d727e87a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4c5f4e9bfa0e29ea9b0d951c9c928c90"><td class="memItemLeft" align="right" valign="top"><a id="a4c5f4e9bfa0e29ea9b0d951c9c928c90"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="yubihsm_8h.html#a4c5f4e9bfa0e29ea9b0d951c9c928c90">YH_USB_URL_SCHEME</a>&#160;&#160;&#160;&quot;yhusb://&quot;</td></tr>
<tr class="memdesc:a4c5f4e9bfa0e29ea9b0d951c9c928c90"><td class="mdescLeft">&#160;</td><td class="mdescRight">URL scheme used for direct USB access. <br /></td></tr>
<tr class="separator:a4c5f4e9bfa0e29ea9b0d951c9c928c90"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa11030bbf6092d8934236958e9478084"><td class="memItemLeft" align="right" valign="top"><a id="aa11030bbf6092d8934236958e9478084"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="yubihsm_8h.html#aa11030bbf6092d8934236958e9478084">YH_VERB_QUIET</a>&#160;&#160;&#160;0x00</td></tr>
<tr class="memdesc:aa11030bbf6092d8934236958e9478084"><td class="mdescLeft">&#160;</td><td class="mdescRight">Debug level quiet. No messages printed out. <br /></td></tr>
<tr class="separator:aa11030bbf6092d8934236958e9478084"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af507fefd9d19bfd531277a6c6cb56452"><td class="memItemLeft" align="right" valign="top"><a id="af507fefd9d19bfd531277a6c6cb56452"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="yubihsm_8h.html#af507fefd9d19bfd531277a6c6cb56452">YH_VERB_INTERMEDIATE</a>&#160;&#160;&#160;0x01</td></tr>
<tr class="memdesc:af507fefd9d19bfd531277a6c6cb56452"><td class="mdescLeft">&#160;</td><td class="mdescRight">Debug level intermediate. Intermediate results printed out. <br /></td></tr>
<tr class="separator:af507fefd9d19bfd531277a6c6cb56452"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8881b983de3922f9abb5d1fcc99216e2"><td class="memItemLeft" align="right" valign="top"><a id="a8881b983de3922f9abb5d1fcc99216e2"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="yubihsm_8h.html#a8881b983de3922f9abb5d1fcc99216e2">YH_VERB_CRYPTO</a>&#160;&#160;&#160;0x02</td></tr>
<tr class="memdesc:a8881b983de3922f9abb5d1fcc99216e2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Debug level crypto. Crypto results printed out. <br /></td></tr>
<tr class="separator:a8881b983de3922f9abb5d1fcc99216e2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4ead07ea7b1232808085d4bdbc7eb5b9"><td class="memItemLeft" align="right" valign="top"><a id="a4ead07ea7b1232808085d4bdbc7eb5b9"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="yubihsm_8h.html#a4ead07ea7b1232808085d4bdbc7eb5b9">YH_VERB_RAW</a>&#160;&#160;&#160;0x04</td></tr>
<tr class="memdesc:a4ead07ea7b1232808085d4bdbc7eb5b9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Debug level raw. Raw messages printed out. <br /></td></tr>
<tr class="separator:a4ead07ea7b1232808085d4bdbc7eb5b9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2ac0b183de01f2dc9f64372e6c66bba4"><td class="memItemLeft" align="right" valign="top"><a id="a2ac0b183de01f2dc9f64372e6c66bba4"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="yubihsm_8h.html#a2ac0b183de01f2dc9f64372e6c66bba4">YH_VERB_INFO</a>&#160;&#160;&#160;0x08</td></tr>
<tr class="memdesc:a2ac0b183de01f2dc9f64372e6c66bba4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Debug level info. General information messages printed out. <br /></td></tr>
<tr class="separator:a2ac0b183de01f2dc9f64372e6c66bba4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a978bb82a3974b6778aadb56fa450e8ca"><td class="memItemLeft" align="right" valign="top"><a id="a978bb82a3974b6778aadb56fa450e8ca"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="yubihsm_8h.html#a978bb82a3974b6778aadb56fa450e8ca">YH_VERB_ERR</a>&#160;&#160;&#160;0x10</td></tr>
<tr class="memdesc:a978bb82a3974b6778aadb56fa450e8ca"><td class="mdescLeft">&#160;</td><td class="mdescRight">Debug level error. Error messages printed out. <br /></td></tr>
<tr class="separator:a978bb82a3974b6778aadb56fa450e8ca"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a15dbe0ac973691939ca6e9148b181ccd"><td class="memItemLeft" align="right" valign="top"><a id="a15dbe0ac973691939ca6e9148b181ccd"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="yubihsm_8h.html#a15dbe0ac973691939ca6e9148b181ccd">YH_VERB_ALL</a>&#160;&#160;&#160;0xff</td></tr>
<tr class="memdesc:a15dbe0ac973691939ca6e9148b181ccd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Debug level all. All previous options enabled. <br /></td></tr>
<tr class="separator:a15dbe0ac973691939ca6e9148b181ccd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a70eafb443aa16eaee3a683e21f0b001a"><td class="memItemLeft" align="right" valign="top"><a id="a70eafb443aa16eaee3a683e21f0b001a"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="yubihsm_8h.html#a70eafb443aa16eaee3a683e21f0b001a">YH_CCM_WRAP_OVERHEAD</a>&#160;&#160;&#160;(1 + 13 + 16)</td></tr>
<tr class="memdesc:a70eafb443aa16eaee3a683e21f0b001a"><td class="mdescLeft">&#160;</td><td class="mdescRight">This is the overhead when doing aes-ccm wrapping: 1 byte identifier, 13 bytes nonce and 16 bytes mac. <br /></td></tr>
<tr class="separator:a70eafb443aa16eaee3a683e21f0b001a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a66a09b99268fe27ce71f7f3e69878ec6"><td class="memItemLeft" align="right" valign="top"><a id="a66a09b99268fe27ce71f7f3e69878ec6"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="yubihsm_8h.html#a66a09b99268fe27ce71f7f3e69878ec6">ADD_COMMAND</a>(c,  v)&#160;&#160;&#160;c = v, c##_R = v | <a class="el" href="yubihsm_8h.html#a158034949fa1cab24db476604d4dabd9">YH_CMD_RESP_FLAG</a></td></tr>
<tr class="memdesc:a66a09b99268fe27ce71f7f3e69878ec6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Macro to define command and response command. <br /></td></tr>
<tr class="separator:a66a09b99268fe27ce71f7f3e69878ec6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6f472329e64b5720ed637fa886aea8c8"><td class="memItemLeft" align="right" valign="top"><a id="a6f472329e64b5720ed637fa886aea8c8"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="yubihsm_8h.html#a6f472329e64b5720ed637fa886aea8c8">YH_MAX_ALGORITHM_COUNT</a>&#160;&#160;&#160;0xff</td></tr>
<tr class="memdesc:a6f472329e64b5720ed637fa886aea8c8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Max number of algorithms defined here. <br /></td></tr>
<tr class="separator:a6f472329e64b5720ed637fa886aea8c8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1b233ade526e2b1a6313e2e2d892bd88"><td class="memItemLeft" align="right" valign="top"><a id="a1b233ade526e2b1a6313e2e2d892bd88"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="yubihsm_8h.html#a1b233ade526e2b1a6313e2e2d892bd88">YH_ORIGIN_GENERATED</a>&#160;&#160;&#160;0x01</td></tr>
<tr class="memdesc:a1b233ade526e2b1a6313e2e2d892bd88"><td class="mdescLeft">&#160;</td><td class="mdescRight">The object was generated on the device. <br /></td></tr>
<tr class="separator:a1b233ade526e2b1a6313e2e2d892bd88"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1b58deb7ffe0ac04a240e07923a8a613"><td class="memItemLeft" align="right" valign="top"><a id="a1b58deb7ffe0ac04a240e07923a8a613"></a>
#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="yubihsm_8h.html#a1b58deb7ffe0ac04a240e07923a8a613">YH_ORIGIN_IMPORTED</a>&#160;&#160;&#160;0x02</td></tr>
<tr class="memdesc:a1b58deb7ffe0ac04a240e07923a8a613"><td class="mdescLeft">&#160;</td><td class="mdescRight">The object was imported into the device. <br /></td></tr>
<tr class="separator:a1b58deb7ffe0ac04a240e07923a8a613"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a03f1a4cf5b57bc3a4eababaee26aa801"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="yubihsm_8h.html#a03f1a4cf5b57bc3a4eababaee26aa801">YH_ORIGIN_IMPORTED_WRAPPED</a>&#160;&#160;&#160;0x10</td></tr>
<tr class="memdesc:a03f1a4cf5b57bc3a4eababaee26aa801"><td class="mdescLeft">&#160;</td><td class="mdescRight">The object was imported into the device under wrap.  <a href="#a03f1a4cf5b57bc3a4eababaee26aa801">More...</a><br /></td></tr>
<tr class="separator:a03f1a4cf5b57bc3a4eababaee26aa801"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr class="memitem:a114f98fee4b67eadd9b89b675632c710"><td class="memItemLeft" align="right" valign="top"><a id="a114f98fee4b67eadd9b89b675632c710"></a>
typedef struct <a class="el" href="yubihsm_8h.html#a114f98fee4b67eadd9b89b675632c710">yh_connector</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="yubihsm_8h.html#a114f98fee4b67eadd9b89b675632c710">yh_connector</a></td></tr>
<tr class="memdesc:a114f98fee4b67eadd9b89b675632c710"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reference to a connector. <br /></td></tr>
<tr class="separator:a114f98fee4b67eadd9b89b675632c710"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa3420d8ccc1fb0b0dee1af5a53cc79de"><td class="memItemLeft" align="right" valign="top"><a id="aa3420d8ccc1fb0b0dee1af5a53cc79de"></a>
typedef struct <a class="el" href="yubihsm_8h.html#aa3420d8ccc1fb0b0dee1af5a53cc79de">yh_session</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="yubihsm_8h.html#aa3420d8ccc1fb0b0dee1af5a53cc79de">yh_session</a></td></tr>
<tr class="memdesc:aa3420d8ccc1fb0b0dee1af5a53cc79de"><td class="mdescLeft">&#160;</td><td class="mdescRight">Reference to a session. <br /></td></tr>
<tr class="separator:aa3420d8ccc1fb0b0dee1af5a53cc79de"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="enum-members"></a>
Enumerations</h2></td></tr>
<tr class="memitem:ae4f602d2343d01b1727dfd633169d366"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a> { <br />
&#160;&#160;<a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a405155512dc2284dc210ed15be1d0815">YHR_SUCCESS</a> = 0, 
<a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a75ea079345046cdbf5612bf9065d8711">YHR_MEMORY_ERROR</a> = -1, 
<a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a1f84ab50c839e0cd6d5b1104a78da569">YHR_INIT_ERROR</a> = -2, 
<a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366ae4f6537a9d33914ea06c53b015d92ca8">YHR_CONNECTION_ERROR</a> = -3, 
<br />
&#160;&#160;<a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366abde0e2f8ca12b6758b246b14a86df11b">YHR_CONNECTOR_NOT_FOUND</a> = -4, 
<a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a731b3992b45fde61b6760d92de4dbbf5">YHR_INVALID_PARAMETERS</a> = -5, 
<a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366ae0b26dcb22aa228ab08c9e59a8975952">YHR_WRONG_LENGTH</a> = -6, 
<a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366ad8971a0b9647564b76b3f4e4b662c965">YHR_BUFFER_TOO_SMALL</a> = -7, 
<br />
&#160;&#160;<a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366afa1bb1b6e469608a295dcc21a7b23608">YHR_CRYPTOGRAM_MISMATCH</a> = -8, 
<a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366af8d55718c98750591e891a37409c9266">YHR_SESSION_AUTHENTICATION_FAILED</a> = -9, 
<a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366adaa2d37fe61d15e17fdea17586ebfbcd">YHR_MAC_MISMATCH</a> = -10, 
<a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366aea70a2fed59f51d794e77a52a0c27db0">YHR_DEVICE_OK</a> = -11, 
<br />
&#160;&#160;<a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a840bcd92d9959f2075c01437cc49371e">YHR_DEVICE_INVALID_COMMAND</a> = -12, 
<a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366ab7388c97719517ba2f7e43d3d16850e1">YHR_DEVICE_INVALID_DATA</a> = -13, 
<a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a36bb9a78d1e8eda6adcf8fb3eff2bf9d">YHR_DEVICE_INVALID_SESSION</a> = -14, 
<a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a9fdf081102d4876da3b7bc9986cdbef8">YHR_DEVICE_AUTHENTICATION_FAILED</a> = -15, 
<br />
&#160;&#160;<a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a8d74af61b564f459e4992436499f837c">YHR_DEVICE_SESSIONS_FULL</a> = -16, 
<a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a9884874ed5a0938ac9ddeec502585fc1">YHR_DEVICE_SESSION_FAILED</a> = -17, 
<a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366ac2fc63d180fd4b31e93695a75bd89e72">YHR_DEVICE_STORAGE_FAILED</a> = -18, 
<a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366ae22388bb4f7dd6a83e36b5789008cd39">YHR_DEVICE_WRONG_LENGTH</a> = -19, 
<br />
&#160;&#160;<a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a2d814fba9f3dbdcb892f92adee1d945c">YHR_DEVICE_INSUFFICIENT_PERMISSIONS</a> = -20, 
<a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366aa71078f32dee465f1156c337c7e4610e">YHR_DEVICE_LOG_FULL</a> = -21, 
<a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a9bc4026d75a26dcaa51ba3310d6b8393">YHR_DEVICE_OBJECT_NOT_FOUND</a> = -22, 
<a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366af5f013b1143c6e430778faaca1592e50">YHR_DEVICE_INVALID_ID</a> = -23, 
<br />
&#160;&#160;<a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366aad5480151e2d8e8caadb6c85d0567265">YHR_DEVICE_INVALID_OTP</a> = -24, 
<a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366ab45152628f7dec50379da96a042b9e71">YHR_DEVICE_DEMO_MODE</a> = -25, 
<a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a45c1eb30625a88593aadff037d48454b">YHR_DEVICE_COMMAND_UNEXECUTED</a> = -26, 
<a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a39fbc5bce29b178582419ae9d31ad252">YHR_GENERIC_ERROR</a> = -27, 
<br />
&#160;&#160;<a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366ad28a1a4679841fd8a7388c8b7981d5db">YHR_DEVICE_OBJECT_EXISTS</a> = -28, 
<a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366ad9339b4f96ca48d9c987ce1e05596fe9">YHR_CONNECTOR_ERROR</a> = -29, 
<a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366ae6b1a467cd82c64277c85b298ef1934b">YHR_DEVICE_SSH_CA_CONSTRAINT_VIOLATION</a> = -30
<br />
 }<tr class="memdesc:ae4f602d2343d01b1727dfd633169d366"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return codes.  <a href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">More...</a><br /></td></tr>
</td></tr>
<tr class="separator:ae4f602d2343d01b1727dfd633169d366"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa5415bafa9c48dfef0e183d8df504b7e"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="yubihsm_8h.html#aa5415bafa9c48dfef0e183d8df504b7e">yh_cmd</a> { <br />
&#160;&#160;<a class="el" href="yubihsm_8h.html#aa5415bafa9c48dfef0e183d8df504b7eae6b3fe5caff1ded14a3cd9b708ce933b">YHC_ECHO</a> = 0x01, 
<b>YHC_ECHO_R</b> = 0x01 | 0x80, 
<a class="el" href="yubihsm_8h.html#aa5415bafa9c48dfef0e183d8df504b7ea7a24521b80c5a1221039476dacdcaf27">YHC_CREATE_SESSION</a> = 0x03, 
<b>YHC_CREATE_SESSION_R</b> = 0x03 | 0x80, 
<br />
&#160;&#160;<a class="el" href="yubihsm_8h.html#aa5415bafa9c48dfef0e183d8df504b7eacb4ef61bb1599fd1a114293a221605a1">YHC_AUTHENTICATE_SESSION</a> = 0x04, 
<b>YHC_AUTHENTICATE_SESSION_R</b> = 0x04 | 0x80, 
<a class="el" href="yubihsm_8h.html#aa5415bafa9c48dfef0e183d8df504b7ea99440ca6f76ab150f569f48d2d0bcd25">YHC_SESSION_MESSAGE</a> = 0x05, 
<b>YHC_SESSION_MESSAGE_R</b> = 0x05 | 0x80, 
<br />
&#160;&#160;<a class="el" href="yubihsm_8h.html#aa5415bafa9c48dfef0e183d8df504b7eace06d0b43a2a80581100cf1776a38f0e">YHC_GET_DEVICE_INFO</a> = 0x06, 
<b>YHC_GET_DEVICE_INFO_R</b> = 0x06 | 0x80, 
<a class="el" href="yubihsm_8h.html#aa5415bafa9c48dfef0e183d8df504b7ea5320ce29ed6d254f22377dac1abb89c3">YHC_RESET_DEVICE</a> = 0x08, 
<b>YHC_RESET_DEVICE_R</b> = 0x08 | 0x80, 
<br />
&#160;&#160;<a class="el" href="yubihsm_8h.html#aa5415bafa9c48dfef0e183d8df504b7eaa146b6b0d6fa832d9cd3ed412e2fb0c0">YHC_CLOSE_SESSION</a> = 0x40, 
<b>YHC_CLOSE_SESSION_R</b> = 0x40 | 0x80, 
<a class="el" href="yubihsm_8h.html#aa5415bafa9c48dfef0e183d8df504b7ea2b9aae2f08a49e1305f64c7a5649ed3c">YHC_GET_STORAGE_INFO</a> = 0x041, 
<b>YHC_GET_STORAGE_INFO_R</b> = 0x041 | 0x80, 
<br />
&#160;&#160;<a class="el" href="yubihsm_8h.html#aa5415bafa9c48dfef0e183d8df504b7ea08ea37d765609e7663719a12f6f4fe8c">YHC_PUT_OPAQUE</a> = 0x42, 
<b>YHC_PUT_OPAQUE_R</b> = 0x42 | 0x80, 
<a class="el" href="yubihsm_8h.html#aa5415bafa9c48dfef0e183d8df504b7ea84c5fd3021700d84b73f734aa1f8f626">YHC_GET_OPAQUE</a> = 0x43, 
<b>YHC_GET_OPAQUE_R</b> = 0x43 | 0x80, 
<br />
&#160;&#160;<a class="el" href="yubihsm_8h.html#aa5415bafa9c48dfef0e183d8df504b7eafb7d9a86be4529c63a0eb8bca46c3c8f">YHC_PUT_AUTHENTICATION_KEY</a> = 0x44, 
<b>YHC_PUT_AUTHENTICATION_KEY_R</b> = 0x44 | 0x80, 
<a class="el" href="yubihsm_8h.html#aa5415bafa9c48dfef0e183d8df504b7eaabc6fa169e75105a6878311899a08176">YHC_PUT_ASYMMETRIC_KEY</a> = 0x45, 
<b>YHC_PUT_ASYMMETRIC_KEY_R</b> = 0x45 | 0x80, 
<br />
&#160;&#160;<a class="el" href="yubihsm_8h.html#aa5415bafa9c48dfef0e183d8df504b7ea3adc1455f48e24dadace769e09ae99ef">YHC_GENERATE_ASYMMETRIC_KEY</a> = 0x46, 
<b>YHC_GENERATE_ASYMMETRIC_KEY_R</b> = 0x46 | 0x80, 
<a class="el" href="yubihsm_8h.html#aa5415bafa9c48dfef0e183d8df504b7ea7e18aa1f59c84afedacd7a2c770de599">YHC_SIGN_PKCS1</a> = 0x47, 
<b>YHC_SIGN_PKCS1_R</b> = 0x47 | 0x80, 
<br />
&#160;&#160;<a class="el" href="yubihsm_8h.html#aa5415bafa9c48dfef0e183d8df504b7eabd60dd90a002636168151e1ccf738bea">YHC_LIST_OBJECTS</a> = 0x48, 
<b>YHC_LIST_OBJECTS_R</b> = 0x48 | 0x80, 
<a class="el" href="yubihsm_8h.html#aa5415bafa9c48dfef0e183d8df504b7ea59f3cbf98c6bb349d9daceeebf1dfb6c">YHC_DECRYPT_PKCS1</a> = 0x49, 
<b>YHC_DECRYPT_PKCS1_R</b> = 0x49 | 0x80, 
<br />
&#160;&#160;<a class="el" href="yubihsm_8h.html#aa5415bafa9c48dfef0e183d8df504b7eaa7faa69e574e88fd7811924cf68333e1">YHC_EXPORT_WRAPPED</a> = 0x4a, 
<b>YHC_EXPORT_WRAPPED_R</b> = 0x4a | 0x80, 
<a class="el" href="yubihsm_8h.html#aa5415bafa9c48dfef0e183d8df504b7ea8cfbbac56dcb89e8c368335425732818">YHC_IMPORT_WRAPPED</a> = 0x4b, 
<b>YHC_IMPORT_WRAPPED_R</b> = 0x4b | 0x80, 
<br />
&#160;&#160;<a class="el" href="yubihsm_8h.html#aa5415bafa9c48dfef0e183d8df504b7ea196ea5e674cb57be9c44bca2fab0f648">YHC_PUT_WRAP_KEY</a> = 0x4c, 
<b>YHC_PUT_WRAP_KEY_R</b> = 0x4c | 0x80, 
<a class="el" href="yubihsm_8h.html#aa5415bafa9c48dfef0e183d8df504b7ea407b7faa2abc38d9aa7cde15be1a40d6">YHC_GET_LOG_ENTRIES</a> = 0x4d, 
<b>YHC_GET_LOG_ENTRIES_R</b> = 0x4d | 0x80, 
<br />
&#160;&#160;<a class="el" href="yubihsm_8h.html#aa5415bafa9c48dfef0e183d8df504b7ead391e68b3b37284e15c419f11bcf54be">YHC_GET_OBJECT_INFO</a> = 0x4e, 
<b>YHC_GET_OBJECT_INFO_R</b> = 0x4e | 0x80, 
<a class="el" href="yubihsm_8h.html#aa5415bafa9c48dfef0e183d8df504b7ea97eacb1db651a5a7b2db7911a2f5631c">YHC_SET_OPTION</a> = 0x4f, 
<b>YHC_SET_OPTION_R</b> = 0x4f | 0x80, 
<br />
&#160;&#160;<a class="el" href="yubihsm_8h.html#aa5415bafa9c48dfef0e183d8df504b7eae350b6b86bec0e5760420288560e91c7">YHC_GET_OPTION</a> = 0x50, 
<b>YHC_GET_OPTION_R</b> = 0x50 | 0x80, 
<a class="el" href="yubihsm_8h.html#aa5415bafa9c48dfef0e183d8df504b7ea5347898552fcefaf090e08d3f0fa16d1">YHC_GET_PSEUDO_RANDOM</a> = 0x51, 
<b>YHC_GET_PSEUDO_RANDOM_R</b> = 0x51 | 0x80, 
<br />
&#160;&#160;<a class="el" href="yubihsm_8h.html#aa5415bafa9c48dfef0e183d8df504b7ea4973a64a582232f5428e590d8a74a4ca">YHC_PUT_HMAC_KEY</a> = 0x52, 
<b>YHC_PUT_HMAC_KEY_R</b> = 0x52 | 0x80, 
<a class="el" href="yubihsm_8h.html#aa5415bafa9c48dfef0e183d8df504b7eaa746f3db48f68374bf0e1a3dbc743e25">YHC_SIGN_HMAC</a> = 0x53, 
<b>YHC_SIGN_HMAC_R</b> = 0x53 | 0x80, 
<br />
&#160;&#160;<a class="el" href="yubihsm_8h.html#aa5415bafa9c48dfef0e183d8df504b7eadb02455455d591b5134c7d064b96940a">YHC_GET_PUBLIC_KEY</a> = 0x54, 
<b>YHC_GET_PUBLIC_KEY_R</b> = 0x54 | 0x80, 
<a class="el" href="yubihsm_8h.html#aa5415bafa9c48dfef0e183d8df504b7eafe1b7412c2ee2c70d95de3e5b187ce9b">YHC_SIGN_PSS</a> = 0x55, 
<b>YHC_SIGN_PSS_R</b> = 0x55 | 0x80, 
<br />
&#160;&#160;<a class="el" href="yubihsm_8h.html#aa5415bafa9c48dfef0e183d8df504b7ea3ed85c21f1f5cd1eb658a37686153c32">YHC_SIGN_ECDSA</a> = 0x56, 
<b>YHC_SIGN_ECDSA_R</b> = 0x56 | 0x80, 
<a class="el" href="yubihsm_8h.html#aa5415bafa9c48dfef0e183d8df504b7ea6924a3fe7f15d482eb15155229385e24">YHC_DERIVE_ECDH</a> = 0x57, 
<b>YHC_DERIVE_ECDH_R</b> = 0x57 | 0x80, 
<br />
&#160;&#160;<a class="el" href="yubihsm_8h.html#aa5415bafa9c48dfef0e183d8df504b7ea103f15650d237a6d729eb591344beb27">YHC_DELETE_OBJECT</a> = 0x58, 
<b>YHC_DELETE_OBJECT_R</b> = 0x58 | 0x80, 
<a class="el" href="yubihsm_8h.html#aa5415bafa9c48dfef0e183d8df504b7ea672606a4eaa485a944fc9b397dfb49fe">YHC_DECRYPT_OAEP</a> = 0x59, 
<b>YHC_DECRYPT_OAEP_R</b> = 0x59 | 0x80, 
<br />
&#160;&#160;<a class="el" href="yubihsm_8h.html#aa5415bafa9c48dfef0e183d8df504b7eaa8f4aa4e5858433726b93b4274ccde44">YHC_GENERATE_HMAC_KEY</a> = 0x5a, 
<b>YHC_GENERATE_HMAC_KEY_R</b> = 0x5a | 0x80, 
<a class="el" href="yubihsm_8h.html#aa5415bafa9c48dfef0e183d8df504b7ea98073b13b11e1b6b8c949fdd55b5beb8">YHC_GENERATE_WRAP_KEY</a> = 0x5b, 
<b>YHC_GENERATE_WRAP_KEY_R</b> = 0x5b | 0x80, 
<br />
&#160;&#160;<a class="el" href="yubihsm_8h.html#aa5415bafa9c48dfef0e183d8df504b7ea8eae52f5e9117bfa52f0a5fe7d7b70c7">YHC_VERIFY_HMAC</a> = 0x5c, 
<b>YHC_VERIFY_HMAC_R</b> = 0x5c | 0x80, 
<a class="el" href="yubihsm_8h.html#aa5415bafa9c48dfef0e183d8df504b7ea40c027d3259d249e93bc5af7cffa2ba8">YHC_SIGN_SSH_CERTIFICATE</a> = 0x5d, 
<b>YHC_SIGN_SSH_CERTIFICATE_R</b> = 0x5d | 0x80, 
<br />
&#160;&#160;<a class="el" href="yubihsm_8h.html#aa5415bafa9c48dfef0e183d8df504b7ea254f1db08db6611467ac60080b8e1efb">YHC_PUT_TEMPLATE</a> = 0x5e, 
<b>YHC_PUT_TEMPLATE_R</b> = 0x5e | 0x80, 
<a class="el" href="yubihsm_8h.html#aa5415bafa9c48dfef0e183d8df504b7ea67689e095f98a1675a327645f277febe">YHC_GET_TEMPLATE</a> = 0x5f, 
<b>YHC_GET_TEMPLATE_R</b> = 0x5f | 0x80, 
<br />
&#160;&#160;<a class="el" href="yubihsm_8h.html#aa5415bafa9c48dfef0e183d8df504b7ea11337520933c31c92d84ade88832c428">YHC_DECRYPT_OTP</a> = 0x60, 
<b>YHC_DECRYPT_OTP_R</b> = 0x60 | 0x80, 
<a class="el" href="yubihsm_8h.html#aa5415bafa9c48dfef0e183d8df504b7ea9182160a3938ffc93f1a07fbfa77f5e9">YHC_CREATE_OTP_AEAD</a> = 0x61, 
<b>YHC_CREATE_OTP_AEAD_R</b> = 0x61 | 0x80, 
<br />
&#160;&#160;<a class="el" href="yubihsm_8h.html#aa5415bafa9c48dfef0e183d8df504b7ea8777e821f221c0be394e0fb1f13a411d">YHC_RANDOMIZE_OTP_AEAD</a> = 0x62, 
<b>YHC_RANDOMIZE_OTP_AEAD_R</b> = 0x62 | 0x80, 
<a class="el" href="yubihsm_8h.html#aa5415bafa9c48dfef0e183d8df504b7eaab512a03e51cea5105117f93370d17f0">YHC_REWRAP_OTP_AEAD</a> = 0x63, 
<b>YHC_REWRAP_OTP_AEAD_R</b> = 0x63 | 0x80, 
<br />
&#160;&#160;<a class="el" href="yubihsm_8h.html#aa5415bafa9c48dfef0e183d8df504b7ea8943e0ac51e6518f85a77f1b3509d2af">YHC_SIGN_ATTESTATION_CERTIFICATE</a> = 0x64, 
<b>YHC_SIGN_ATTESTATION_CERTIFICATE_R</b> = 0x64 | 0x80, 
<a class="el" href="yubihsm_8h.html#aa5415bafa9c48dfef0e183d8df504b7ea580f4a45e7fb32de7cea8475d3397500">YHC_PUT_OTP_AEAD_KEY</a> = 0x65, 
<b>YHC_PUT_OTP_AEAD_KEY_R</b> = 0x65 | 0x80, 
<br />
&#160;&#160;<a class="el" href="yubihsm_8h.html#aa5415bafa9c48dfef0e183d8df504b7ea58884e12c4e65351037902e59d98d497">YHC_GENERATE_OTP_AEAD_KEY</a> = 0x66, 
<b>YHC_GENERATE_OTP_AEAD_KEY_R</b> = 0x66 | 0x80, 
<a class="el" href="yubihsm_8h.html#aa5415bafa9c48dfef0e183d8df504b7ead7ee3c3b805a89c9c2708f15b9ec165a">YHC_SET_LOG_INDEX</a> = 0x67, 
<b>YHC_SET_LOG_INDEX_R</b> = 0x67 | 0x80, 
<br />
&#160;&#160;<a class="el" href="yubihsm_8h.html#aa5415bafa9c48dfef0e183d8df504b7ea852e001ac88c54fddceb9ed4c5a8d386">YHC_WRAP_DATA</a> = 0x68, 
<b>YHC_WRAP_DATA_R</b> = 0x68 | 0x80, 
<a class="el" href="yubihsm_8h.html#aa5415bafa9c48dfef0e183d8df504b7ea86a36b37a45067589ed796cc96ab047d">YHC_UNWRAP_DATA</a> = 0x69, 
<b>YHC_UNWRAP_DATA_R</b> = 0x69 | 0x80, 
<br />
&#160;&#160;<a class="el" href="yubihsm_8h.html#aa5415bafa9c48dfef0e183d8df504b7ea753bb59b9d30189cc0c311d4c9ff4480">YHC_SIGN_EDDSA</a> = 0x6a, 
<b>YHC_SIGN_EDDSA_R</b> = 0x6a | 0x80, 
<a class="el" href="yubihsm_8h.html#aa5415bafa9c48dfef0e183d8df504b7eab85f00cab685ade5857fa555fb926a7a">YHC_BLINK_DEVICE</a> = 0x6b, 
<b>YHC_BLINK_DEVICE_R</b> = 0x6b | 0x80, 
<br />
&#160;&#160;<a class="el" href="yubihsm_8h.html#aa5415bafa9c48dfef0e183d8df504b7ea5a0649ee2fba224fec086884f368faa0">YHC_CHANGE_AUTHENTICATION_KEY</a> = 0x6c, 
<b>YHC_CHANGE_AUTHENTICATION_KEY_R</b> = 0x6c | 0x80, 
<a class="el" href="yubihsm_8h.html#aa5415bafa9c48dfef0e183d8df504b7ea51cdf2ccd6995498e589e8ea6ce2a1f2">YHC_ERROR</a> = 0x7f
<br />
 }<tr class="memdesc:aa5415bafa9c48dfef0e183d8df504b7e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Command definitions.  <a href="yubihsm_8h.html#aa5415bafa9c48dfef0e183d8df504b7e">More...</a><br /></td></tr>
</td></tr>
<tr class="separator:aa5415bafa9c48dfef0e183d8df504b7e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2fe39512cb4df34b270a67dbb8e13583"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="yubihsm_8h.html#a2fe39512cb4df34b270a67dbb8e13583">yh_object_type</a> { <br />
&#160;&#160;<a class="el" href="yubihsm_8h.html#a2fe39512cb4df34b270a67dbb8e13583a5d37b7418d50b420621e6a6eb2700de4">YH_OPAQUE</a> = 0x01, 
<a class="el" href="yubihsm_8h.html#a2fe39512cb4df34b270a67dbb8e13583acee44b775b3c5b6157f0732699935074">YH_AUTHENTICATION_KEY</a> = 0x02, 
<a class="el" href="yubihsm_8h.html#a2fe39512cb4df34b270a67dbb8e13583ab71424e16384319d6e6a12f9a3d8ceae">YH_ASYMMETRIC_KEY</a> = 0x03, 
<a class="el" href="yubihsm_8h.html#a2fe39512cb4df34b270a67dbb8e13583a16f0118db1dac3d0732e7d66630e1dba">YH_WRAP_KEY</a> = 0x04, 
<br />
&#160;&#160;<a class="el" href="yubihsm_8h.html#a2fe39512cb4df34b270a67dbb8e13583a708d85f80fc33743ac26a7c3e43464a9">YH_HMAC_KEY</a> = 0x05, 
<a class="el" href="yubihsm_8h.html#a2fe39512cb4df34b270a67dbb8e13583a96244762de5ce4175e60157239e7a097">YH_TEMPLATE</a> = 0x06, 
<a class="el" href="yubihsm_8h.html#a2fe39512cb4df34b270a67dbb8e13583a02c5f683fde147de6a9e1043f971f5f0">YH_OTP_AEAD_KEY</a> = 0x07, 
<a class="el" href="yubihsm_8h.html#a2fe39512cb4df34b270a67dbb8e13583af12da448809687dd5d8ca182ecd8dfeb">YH_PUBLIC_KEY</a> = 0x83
<br />
 }<tr class="memdesc:a2fe39512cb4df34b270a67dbb8e13583"><td class="mdescLeft">&#160;</td><td class="mdescRight">Object types.  <a href="yubihsm_8h.html#a2fe39512cb4df34b270a67dbb8e13583">More...</a><br /></td></tr>
</td></tr>
<tr class="separator:a2fe39512cb4df34b270a67dbb8e13583"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a498937b5a72accbb0ef21bb1dcdd55ca"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55ca">yh_algorithm</a> { <br />
&#160;&#160;<a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55caa1982e3db182a679514674f454e2b79ad">YH_ALGO_RSA_PKCS1_SHA1</a> = 1, 
<a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55caa18e17370fcf9a829572e57608aff743c">YH_ALGO_RSA_PKCS1_SHA256</a> = 2, 
<a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55caafc78c2f62fe0a185c38d2644755fde2c">YH_ALGO_RSA_PKCS1_SHA384</a> = 3, 
<a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55caa84e18ba6561d5a834dc8d794504708db">YH_ALGO_RSA_PKCS1_SHA512</a> = 4, 
<br />
&#160;&#160;<a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55caa24d40fa957c584cf2ef0f5b0053b9f32">YH_ALGO_RSA_PSS_SHA1</a> = 5, 
<a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55caac42381f876f5e7190547cf81021451f5">YH_ALGO_RSA_PSS_SHA256</a> = 6, 
<a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55caa144083d6414cb33e8543d51e7d361d05">YH_ALGO_RSA_PSS_SHA384</a> = 7, 
<a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55caa1d5a50a1a53000cd2b2989c17703e2d1">YH_ALGO_RSA_PSS_SHA512</a> = 8, 
<br />
&#160;&#160;<a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55caaafe94e6a770edb51c6db84f77d98d2c6">YH_ALGO_RSA_2048</a> = 9, 
<a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55caafd3fbd9ed86caf267ccc77cb24d44426">YH_ALGO_RSA_3072</a> = 10, 
<a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55caae5963322a0a0f43a1b74faa78e3a7329">YH_ALGO_RSA_4096</a> = 11, 
<a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55caae4b191baf5c65f9234120080264d129b">YH_ALGO_EC_P256</a> = 12, 
<br />
&#160;&#160;<a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55caa31094c17c66e4c365ca3dad353bc8bda">YH_ALGO_EC_P384</a> = 13, 
<a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55caa05aec903fd67851f968aaa606fe2138a">YH_ALGO_EC_P521</a> = 14, 
<a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55caad423056b13955068935dc8b3ac0e65d1">YH_ALGO_EC_K256</a> = 15, 
<a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55caabd995726d45b6dd2388775db4767c80d">YH_ALGO_EC_BP256</a> = 16, 
<br />
&#160;&#160;<a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55caa228fd3332b55c60438dfea6a1b09af36">YH_ALGO_EC_BP384</a> = 17, 
<a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55caab9c1be17b7b3f755346ff8c3cca3ed25">YH_ALGO_EC_BP512</a> = 18, 
<a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55caa942e65c8cd0034eebe9a20c2297c7b06">YH_ALGO_HMAC_SHA1</a> = 19, 
<a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55caab0a0e1eb424b61057f159f1e53311f5c">YH_ALGO_HMAC_SHA256</a> = 20, 
<br />
&#160;&#160;<a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55caa781e7ca62563917d2129bde8ec53401b">YH_ALGO_HMAC_SHA384</a> = 21, 
<a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55caa72d6c7ea77f10e39bbadc8b58d55b9ec">YH_ALGO_HMAC_SHA512</a> = 22, 
<a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55caae9b7b5598c3839a53e4986dc901be244">YH_ALGO_EC_ECDSA_SHA1</a> = 23, 
<a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55caa14b36e4ff3b90d44ace0aa2b2c65ef48">YH_ALGO_EC_ECDH</a> = 24, 
<br />
&#160;&#160;<a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55caae9e58613e12b0f9f445e620f1dd77e1d">YH_ALGO_RSA_OAEP_SHA1</a> = 25, 
<a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55caa590665f5e23f996daeba0a2586b2ff33">YH_ALGO_RSA_OAEP_SHA256</a> = 26, 
<a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55caab2580ffabb9b08affd0f7803fb1536cd">YH_ALGO_RSA_OAEP_SHA384</a> = 27, 
<a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55caaa4c2625511af2c17ed83da552d3dc5f6">YH_ALGO_RSA_OAEP_SHA512</a> = 28, 
<br />
&#160;&#160;<a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55caae22b228e457c9bdccb5a93d81730b1b1">YH_ALGO_AES128_CCM_WRAP</a> = 29, 
<a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55caab2dc1e1157cd653f7674df10eb145fc3">YH_ALGO_OPAQUE_DATA</a> = 30, 
<a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55caa590b0ef9be4ed65e87e26c985bb7f350">YH_ALGO_OPAQUE_X509_CERTIFICATE</a> = 31, 
<a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55caae1ab21f2df42a56bdc8ff046ed14797a">YH_ALGO_MGF1_SHA1</a> = 32, 
<br />
&#160;&#160;<a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55caae3f68121c91d613fe450c12fad55eab2">YH_ALGO_MGF1_SHA256</a> = 33, 
<a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55caa788440387af34a9aa10a3e5561c8ee31">YH_ALGO_MGF1_SHA384</a> = 34, 
<a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55caa104308e8fac7553b1d875f149ff133b1">YH_ALGO_MGF1_SHA512</a> = 35, 
<a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55caad75fd14ef18fed62ae13cd3657fce3b2">YH_ALGO_TEMPLATE_SSH</a> = 36, 
<br />
&#160;&#160;<a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55caa62e7ba4126ae16faeafb28972a4e0959">YH_ALGO_AES128_YUBICO_OTP</a> = 37, 
<a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55caa461952ba18e7fcd792e480f71c853513">YH_ALGO_AES128_YUBICO_AUTHENTICATION</a> = 38, 
<a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55caa62dd31db747b4b7f81d9e30877a0b720">YH_ALGO_AES192_YUBICO_OTP</a> = 39, 
<a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55caad1558532867577d1d77c84f1ae632acd">YH_ALGO_AES256_YUBICO_OTP</a> = 40, 
<br />
&#160;&#160;<a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55caab739a1d142dacaf37ba13a73e2d83fab">YH_ALGO_AES192_CCM_WRAP</a> = 41, 
<a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55caa927e2246e5657f946b4da4b71092b022">YH_ALGO_AES256_CCM_WRAP</a> = 42, 
<a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55caa2e5dfe9c79cb0d391d7bf952227268ec">YH_ALGO_EC_ECDSA_SHA256</a> = 43, 
<a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55caa657d2b30d884aeeff3c024404132ad69">YH_ALGO_EC_ECDSA_SHA384</a> = 44, 
<br />
&#160;&#160;<a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55caa44153987efd3466070143dbab77f2d70">YH_ALGO_EC_ECDSA_SHA512</a> = 45, 
<a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55caa68c2c97f16c36f727e41a899d8a7e8bd">YH_ALGO_EC_ED25519</a> = 46, 
<a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55caaedcbc07d82b18ca5c21eb3379a6cc010">YH_ALGO_EC_P224</a> = 47
<br />
 }<tr class="memdesc:a498937b5a72accbb0ef21bb1dcdd55ca"><td class="mdescLeft">&#160;</td><td class="mdescRight">Algorithms.  <a href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55ca">More...</a><br /></td></tr>
</td></tr>
<tr class="separator:a498937b5a72accbb0ef21bb1dcdd55ca"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acc8090ce0ec5029b376803e44b1cb4aa"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="yubihsm_8h.html#acc8090ce0ec5029b376803e44b1cb4aa">yh_option</a> { <a class="el" href="yubihsm_8h.html#acc8090ce0ec5029b376803e44b1cb4aaa3431b9d5cadb9b297def332792e51f00">YH_OPTION_FORCE_AUDIT</a> = 1, 
<a class="el" href="yubihsm_8h.html#acc8090ce0ec5029b376803e44b1cb4aaaf7c1e8ebce866eddcb7bc7ca8fa556da">YH_OPTION_COMMAND_AUDIT</a> = 3
 }<tr class="memdesc:acc8090ce0ec5029b376803e44b1cb4aa"><td class="mdescLeft">&#160;</td><td class="mdescRight">Global options.  <a href="yubihsm_8h.html#acc8090ce0ec5029b376803e44b1cb4aa">More...</a><br /></td></tr>
</td></tr>
<tr class="separator:acc8090ce0ec5029b376803e44b1cb4aa"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a59400bce0478b88e048d5e62b2b0b015"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="yubihsm_8h.html#a59400bce0478b88e048d5e62b2b0b015">yh_connector_option</a> { <a class="el" href="yubihsm_8h.html#a59400bce0478b88e048d5e62b2b0b015aef4e49a3018eee6219e6fdee93b32386">YH_CONNECTOR_HTTPS_CA</a> = 1, 
<a class="el" href="yubihsm_8h.html#a59400bce0478b88e048d5e62b2b0b015a90c65d2ccea0060d121c9c60b3a8b2df">YH_CONNECTOR_PROXY_SERVER</a> = 2
 }<tr class="memdesc:a59400bce0478b88e048d5e62b2b0b015"><td class="mdescLeft">&#160;</td><td class="mdescRight">Options for the connector, set with <a class="el" href="yubihsm_8h.html#a9addbfae4cdb70b819986e7769cdd102" title="Set connector options. ">yh_set_connector_option()</a>  <a href="yubihsm_8h.html#a59400bce0478b88e048d5e62b2b0b015">More...</a><br /></td></tr>
</td></tr>
<tr class="separator:a59400bce0478b88e048d5e62b2b0b015"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ab2ca147574f7aa4ba01ee0c52d716b3f"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="yubihsm_8h.html#ab2ca147574f7aa4ba01ee0c52d716b3f">yh_strerror</a> (<a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a> err)</td></tr>
<tr class="memdesc:ab2ca147574f7aa4ba01ee0c52d716b3f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return a string describing an error condition.  <a href="#ab2ca147574f7aa4ba01ee0c52d716b3f">More...</a><br /></td></tr>
<tr class="separator:ab2ca147574f7aa4ba01ee0c52d716b3f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a24c3146e51242256af505961e763f417"><td class="memItemLeft" align="right" valign="top"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="yubihsm_8h.html#a24c3146e51242256af505961e763f417">yh_set_verbosity</a> (<a class="el" href="yubihsm_8h.html#a114f98fee4b67eadd9b89b675632c710">yh_connector</a> *connector, uint8_t verbosity)</td></tr>
<tr class="memdesc:a24c3146e51242256af505961e763f417"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set verbosity level when executing commands.  <a href="#a24c3146e51242256af505961e763f417">More...</a><br /></td></tr>
<tr class="separator:a24c3146e51242256af505961e763f417"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a17d49ccb12b100e98d8b99585a705444"><td class="memItemLeft" align="right" valign="top"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="yubihsm_8h.html#a17d49ccb12b100e98d8b99585a705444">yh_get_verbosity</a> (uint8_t *verbosity)</td></tr>
<tr class="memdesc:a17d49ccb12b100e98d8b99585a705444"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get verbosity level when executing commands.  <a href="#a17d49ccb12b100e98d8b99585a705444">More...</a><br /></td></tr>
<tr class="separator:a17d49ccb12b100e98d8b99585a705444"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7d223fd4ee6ae3f578307d72aba37a19"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="yubihsm_8h.html#a7d223fd4ee6ae3f578307d72aba37a19">yh_set_debug_output</a> (<a class="el" href="yubihsm_8h.html#a114f98fee4b67eadd9b89b675632c710">yh_connector</a> *connector, FILE *output)</td></tr>
<tr class="memdesc:a7d223fd4ee6ae3f578307d72aba37a19"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set file for debug output.  <a href="#a7d223fd4ee6ae3f578307d72aba37a19">More...</a><br /></td></tr>
<tr class="separator:a7d223fd4ee6ae3f578307d72aba37a19"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5392844a98c6220c69fe08d3dcf8f1bc"><td class="memItemLeft" align="right" valign="top"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="yubihsm_8h.html#a5392844a98c6220c69fe08d3dcf8f1bc">yh_init</a> (void)</td></tr>
<tr class="memdesc:a5392844a98c6220c69fe08d3dcf8f1bc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Global library initialization.  <a href="#a5392844a98c6220c69fe08d3dcf8f1bc">More...</a><br /></td></tr>
<tr class="separator:a5392844a98c6220c69fe08d3dcf8f1bc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a36e3d9a07c6689e14a9339ca1ebb7259"><td class="memItemLeft" align="right" valign="top"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="yubihsm_8h.html#a36e3d9a07c6689e14a9339ca1ebb7259">yh_exit</a> (void)</td></tr>
<tr class="memdesc:a36e3d9a07c6689e14a9339ca1ebb7259"><td class="mdescLeft">&#160;</td><td class="mdescRight">Global library clean up.  <a href="#a36e3d9a07c6689e14a9339ca1ebb7259">More...</a><br /></td></tr>
<tr class="separator:a36e3d9a07c6689e14a9339ca1ebb7259"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9c700747902a722d6c1d2073277de294"><td class="memItemLeft" align="right" valign="top"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="yubihsm_8h.html#a9c700747902a722d6c1d2073277de294">yh_init_connector</a> (const char *url, <a class="el" href="yubihsm_8h.html#a114f98fee4b67eadd9b89b675632c710">yh_connector</a> **connector)</td></tr>
<tr class="memdesc:a9c700747902a722d6c1d2073277de294"><td class="mdescLeft">&#160;</td><td class="mdescRight">Instantiate a new connector.  <a href="#a9c700747902a722d6c1d2073277de294">More...</a><br /></td></tr>
<tr class="separator:a9c700747902a722d6c1d2073277de294"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9addbfae4cdb70b819986e7769cdd102"><td class="memItemLeft" align="right" valign="top"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="yubihsm_8h.html#a9addbfae4cdb70b819986e7769cdd102">yh_set_connector_option</a> (<a class="el" href="yubihsm_8h.html#a114f98fee4b67eadd9b89b675632c710">yh_connector</a> *connector, <a class="el" href="yubihsm_8h.html#a59400bce0478b88e048d5e62b2b0b015">yh_connector_option</a> opt, const void *val)</td></tr>
<tr class="memdesc:a9addbfae4cdb70b819986e7769cdd102"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set connector options.  <a href="#a9addbfae4cdb70b819986e7769cdd102">More...</a><br /></td></tr>
<tr class="separator:a9addbfae4cdb70b819986e7769cdd102"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa19be6ac70a2a5d1cef8d7e6902fe05f"><td class="memItemLeft" align="right" valign="top"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="yubihsm_8h.html#aa19be6ac70a2a5d1cef8d7e6902fe05f">yh_connect</a> (<a class="el" href="yubihsm_8h.html#a114f98fee4b67eadd9b89b675632c710">yh_connector</a> *connector, int timeout)</td></tr>
<tr class="memdesc:aa19be6ac70a2a5d1cef8d7e6902fe05f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Connect to the device through the specified connector.  <a href="#aa19be6ac70a2a5d1cef8d7e6902fe05f">More...</a><br /></td></tr>
<tr class="separator:aa19be6ac70a2a5d1cef8d7e6902fe05f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab12d5a42d2219741bd3630b99ed1c7d2"><td class="memItemLeft" align="right" valign="top"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="yubihsm_8h.html#ab12d5a42d2219741bd3630b99ed1c7d2">yh_disconnect</a> (<a class="el" href="yubihsm_8h.html#a114f98fee4b67eadd9b89b675632c710">yh_connector</a> *connector)</td></tr>
<tr class="memdesc:ab12d5a42d2219741bd3630b99ed1c7d2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Disconnect from a connector.  <a href="#ab12d5a42d2219741bd3630b99ed1c7d2">More...</a><br /></td></tr>
<tr class="separator:ab12d5a42d2219741bd3630b99ed1c7d2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a799e299be8d4c13dfa2112a60d05480d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="yubihsm_8h.html#a799e299be8d4c13dfa2112a60d05480d">yh_send_plain_msg</a> (<a class="el" href="yubihsm_8h.html#a114f98fee4b67eadd9b89b675632c710">yh_connector</a> *connector, <a class="el" href="yubihsm_8h.html#aa5415bafa9c48dfef0e183d8df504b7e">yh_cmd</a> cmd, const uint8_t *data, size_t data_len, <a class="el" href="yubihsm_8h.html#aa5415bafa9c48dfef0e183d8df504b7e">yh_cmd</a> *response_cmd, uint8_t *response, size_t *response_len)</td></tr>
<tr class="memdesc:a799e299be8d4c13dfa2112a60d05480d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Send a plain (unencrypted) message to the device through a connector.  <a href="#a799e299be8d4c13dfa2112a60d05480d">More...</a><br /></td></tr>
<tr class="separator:a799e299be8d4c13dfa2112a60d05480d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4c26f003b72e800e9c934bca922a404a"><td class="memItemLeft" align="right" valign="top"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="yubihsm_8h.html#a4c26f003b72e800e9c934bca922a404a">yh_send_secure_msg</a> (<a class="el" href="yubihsm_8h.html#aa3420d8ccc1fb0b0dee1af5a53cc79de">yh_session</a> *session, <a class="el" href="yubihsm_8h.html#aa5415bafa9c48dfef0e183d8df504b7e">yh_cmd</a> cmd, const uint8_t *data, size_t data_len, <a class="el" href="yubihsm_8h.html#aa5415bafa9c48dfef0e183d8df504b7e">yh_cmd</a> *response_cmd, uint8_t *response, size_t *response_len)</td></tr>
<tr class="memdesc:a4c26f003b72e800e9c934bca922a404a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Send an encrypted message to the device over a session.  <a href="#a4c26f003b72e800e9c934bca922a404a">More...</a><br /></td></tr>
<tr class="separator:a4c26f003b72e800e9c934bca922a404a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4e5534e6c597a7d32040ea1cc7254c93"><td class="memItemLeft" align="right" valign="top"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="yubihsm_8h.html#a4e5534e6c597a7d32040ea1cc7254c93">yh_create_session_derived</a> (<a class="el" href="yubihsm_8h.html#a114f98fee4b67eadd9b89b675632c710">yh_connector</a> *connector, uint16_t authkey_id, const uint8_t *password, size_t password_len, bool recreate_session, <a class="el" href="yubihsm_8h.html#aa3420d8ccc1fb0b0dee1af5a53cc79de">yh_session</a> **session)</td></tr>
<tr class="memdesc:a4e5534e6c597a7d32040ea1cc7254c93"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create a session that uses an encryption key and a MAC key derived from a password.  <a href="#a4e5534e6c597a7d32040ea1cc7254c93">More...</a><br /></td></tr>
<tr class="separator:a4e5534e6c597a7d32040ea1cc7254c93"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac1534725e97dbf81b37652fe1bffb97a"><td class="memItemLeft" align="right" valign="top"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="yubihsm_8h.html#ac1534725e97dbf81b37652fe1bffb97a">yh_create_session</a> (<a class="el" href="yubihsm_8h.html#a114f98fee4b67eadd9b89b675632c710">yh_connector</a> *connector, uint16_t authkey_id, const uint8_t *key_enc, size_t key_enc_len, const uint8_t *key_mac, size_t key_mac_len, bool recreate_session, <a class="el" href="yubihsm_8h.html#aa3420d8ccc1fb0b0dee1af5a53cc79de">yh_session</a> **session)</td></tr>
<tr class="memdesc:ac1534725e97dbf81b37652fe1bffb97a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create a session that uses the specified encryption key and MAC key to derive session-specific keys.  <a href="#ac1534725e97dbf81b37652fe1bffb97a">More...</a><br /></td></tr>
<tr class="separator:ac1534725e97dbf81b37652fe1bffb97a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a296b43eadb1151017ba8e9578b351c5e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="yubihsm_8h.html#a296b43eadb1151017ba8e9578b351c5e">yh_begin_create_session_ext</a> (<a class="el" href="yubihsm_8h.html#a114f98fee4b67eadd9b89b675632c710">yh_connector</a> *connector, uint16_t authkey_id, uint8_t **context, uint8_t *card_cryptogram, size_t card_cryptogram_len, <a class="el" href="yubihsm_8h.html#aa3420d8ccc1fb0b0dee1af5a53cc79de">yh_session</a> **session)</td></tr>
<tr class="memdesc:a296b43eadb1151017ba8e9578b351c5e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Begin creating an external session.  <a href="#a296b43eadb1151017ba8e9578b351c5e">More...</a><br /></td></tr>
<tr class="separator:a296b43eadb1151017ba8e9578b351c5e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afbcb5c761339fbcf444be8f338b4614f"><td class="memItemLeft" align="right" valign="top"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="yubihsm_8h.html#afbcb5c761339fbcf444be8f338b4614f">yh_finish_create_session_ext</a> (<a class="el" href="yubihsm_8h.html#a114f98fee4b67eadd9b89b675632c710">yh_connector</a> *connector, <a class="el" href="yubihsm_8h.html#aa3420d8ccc1fb0b0dee1af5a53cc79de">yh_session</a> *session, const uint8_t *key_senc, size_t key_senc_len, const uint8_t *key_smac, size_t key_smac_len, const uint8_t *key_srmac, size_t key_srmac_len, uint8_t *card_cryptogram, size_t card_cryptogram_len)</td></tr>
<tr class="memdesc:afbcb5c761339fbcf444be8f338b4614f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Finish creating external session.  <a href="#afbcb5c761339fbcf444be8f338b4614f">More...</a><br /></td></tr>
<tr class="separator:afbcb5c761339fbcf444be8f338b4614f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1a35f8ae5a739848408633a514e41b2d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="yubihsm_8h.html#a1a35f8ae5a739848408633a514e41b2d">yh_destroy_session</a> (<a class="el" href="yubihsm_8h.html#aa3420d8ccc1fb0b0dee1af5a53cc79de">yh_session</a> **session)</td></tr>
<tr class="memdesc:a1a35f8ae5a739848408633a514e41b2d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Free data associated with the session.  <a href="#a1a35f8ae5a739848408633a514e41b2d">More...</a><br /></td></tr>
<tr class="separator:a1a35f8ae5a739848408633a514e41b2d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a77870209747d5ccd90f9da3aae2bdfa8"><td class="memItemLeft" align="right" valign="top"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="yubihsm_8h.html#a77870209747d5ccd90f9da3aae2bdfa8">yh_authenticate_session</a> (<a class="el" href="yubihsm_8h.html#aa3420d8ccc1fb0b0dee1af5a53cc79de">yh_session</a> *session)</td></tr>
<tr class="memdesc:a77870209747d5ccd90f9da3aae2bdfa8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Authenticate session.  <a href="#a77870209747d5ccd90f9da3aae2bdfa8">More...</a><br /></td></tr>
<tr class="separator:a77870209747d5ccd90f9da3aae2bdfa8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6ab558e1426359cc78e7a362f8b3acd9"><td class="memItemLeft" align="right" valign="top"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="yubihsm_8h.html#a6ab558e1426359cc78e7a362f8b3acd9">yh_util_get_device_info</a> (<a class="el" href="yubihsm_8h.html#a114f98fee4b67eadd9b89b675632c710">yh_connector</a> *connector, uint8_t *major, uint8_t *minor, uint8_t *patch, uint32_t *serial, uint8_t *log_total, uint8_t *log_used, <a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55ca">yh_algorithm</a> *algorithms, size_t *n_algorithms)</td></tr>
<tr class="memdesc:a6ab558e1426359cc78e7a362f8b3acd9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get device version, device serial number, supported algorithms and available log entries.  <a href="#a6ab558e1426359cc78e7a362f8b3acd9">More...</a><br /></td></tr>
<tr class="separator:a6ab558e1426359cc78e7a362f8b3acd9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7cbea7103efff8473ccfaaa35bfc6346"><td class="memItemLeft" align="right" valign="top"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="yubihsm_8h.html#a7cbea7103efff8473ccfaaa35bfc6346">yh_util_list_objects</a> (<a class="el" href="yubihsm_8h.html#aa3420d8ccc1fb0b0dee1af5a53cc79de">yh_session</a> *session, uint16_t id, <a class="el" href="yubihsm_8h.html#a2fe39512cb4df34b270a67dbb8e13583">yh_object_type</a> type, uint16_t domains, const <a class="el" href="structyh__capabilities.html">yh_capabilities</a> *capabilities, <a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55ca">yh_algorithm</a> algorithm, const char *label, <a class="el" href="structyh__object__descriptor.html">yh_object_descriptor</a> *objects, size_t *n_objects)</td></tr>
<tr class="memdesc:a7cbea7103efff8473ccfaaa35bfc6346"><td class="mdescLeft">&#160;</td><td class="mdescRight">List objects accessible from the session.  <a href="#a7cbea7103efff8473ccfaaa35bfc6346">More...</a><br /></td></tr>
<tr class="separator:a7cbea7103efff8473ccfaaa35bfc6346"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7b5f1f0c1cbca11fbe21e7e4e6b29a1b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="yubihsm_8h.html#a7b5f1f0c1cbca11fbe21e7e4e6b29a1b">yh_util_get_object_info</a> (<a class="el" href="yubihsm_8h.html#aa3420d8ccc1fb0b0dee1af5a53cc79de">yh_session</a> *session, uint16_t id, <a class="el" href="yubihsm_8h.html#a2fe39512cb4df34b270a67dbb8e13583">yh_object_type</a> type, <a class="el" href="structyh__object__descriptor.html">yh_object_descriptor</a> *object)</td></tr>
<tr class="memdesc:a7b5f1f0c1cbca11fbe21e7e4e6b29a1b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get metadata of the object with the specified Object ID and Type.  <a href="#a7b5f1f0c1cbca11fbe21e7e4e6b29a1b">More...</a><br /></td></tr>
<tr class="separator:a7b5f1f0c1cbca11fbe21e7e4e6b29a1b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa7b8b42156c4bdaf41d8b9758a2fd73f"><td class="memItemLeft" align="right" valign="top"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="yubihsm_8h.html#aa7b8b42156c4bdaf41d8b9758a2fd73f">yh_util_get_public_key</a> (<a class="el" href="yubihsm_8h.html#aa3420d8ccc1fb0b0dee1af5a53cc79de">yh_session</a> *session, uint16_t id, uint8_t *data, size_t *data_len, <a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55ca">yh_algorithm</a> *algorithm)</td></tr>
<tr class="memdesc:aa7b8b42156c4bdaf41d8b9758a2fd73f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the value of the public key with the specified Object ID.  <a href="#aa7b8b42156c4bdaf41d8b9758a2fd73f">More...</a><br /></td></tr>
<tr class="separator:aa7b8b42156c4bdaf41d8b9758a2fd73f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a61ab8dbab67b1cceb49cd306f8c3f4b1"><td class="memItemLeft" align="right" valign="top"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="yubihsm_8h.html#a61ab8dbab67b1cceb49cd306f8c3f4b1">yh_util_close_session</a> (<a class="el" href="yubihsm_8h.html#aa3420d8ccc1fb0b0dee1af5a53cc79de">yh_session</a> *session)</td></tr>
<tr class="memdesc:a61ab8dbab67b1cceb49cd306f8c3f4b1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Close a session.  <a href="#a61ab8dbab67b1cceb49cd306f8c3f4b1">More...</a><br /></td></tr>
<tr class="separator:a61ab8dbab67b1cceb49cd306f8c3f4b1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa0a7644b7b368d6aaf8b4aff5e3d19b8"><td class="memItemLeft" align="right" valign="top"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="yubihsm_8h.html#aa0a7644b7b368d6aaf8b4aff5e3d19b8">yh_util_sign_pkcs1v1_5</a> (<a class="el" href="yubihsm_8h.html#aa3420d8ccc1fb0b0dee1af5a53cc79de">yh_session</a> *session, uint16_t key_id, bool hashed, const uint8_t *in, size_t in_len, uint8_t *out, size_t *out_len)</td></tr>
<tr class="memdesc:aa0a7644b7b368d6aaf8b4aff5e3d19b8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sign data using RSA-PKCS#1v1.5.  <a href="#aa0a7644b7b368d6aaf8b4aff5e3d19b8">More...</a><br /></td></tr>
<tr class="separator:aa0a7644b7b368d6aaf8b4aff5e3d19b8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a944e6f31487857709f032598fd43fef5"><td class="memItemLeft" align="right" valign="top"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="yubihsm_8h.html#a944e6f31487857709f032598fd43fef5">yh_util_sign_pss</a> (<a class="el" href="yubihsm_8h.html#aa3420d8ccc1fb0b0dee1af5a53cc79de">yh_session</a> *session, uint16_t key_id, const uint8_t *in, size_t in_len, uint8_t *out, size_t *out_len, size_t salt_len, <a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55ca">yh_algorithm</a> mgf1Algo)</td></tr>
<tr class="memdesc:a944e6f31487857709f032598fd43fef5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sign data using RSA-PSS.  <a href="#a944e6f31487857709f032598fd43fef5">More...</a><br /></td></tr>
<tr class="separator:a944e6f31487857709f032598fd43fef5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5121c90d3bd745afd8264fef2ef39ace"><td class="memItemLeft" align="right" valign="top"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="yubihsm_8h.html#a5121c90d3bd745afd8264fef2ef39ace">yh_util_sign_ecdsa</a> (<a class="el" href="yubihsm_8h.html#aa3420d8ccc1fb0b0dee1af5a53cc79de">yh_session</a> *session, uint16_t key_id, const uint8_t *in, size_t in_len, uint8_t *out, size_t *out_len)</td></tr>
<tr class="memdesc:a5121c90d3bd745afd8264fef2ef39ace"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sign data using ECDSA.  <a href="#a5121c90d3bd745afd8264fef2ef39ace">More...</a><br /></td></tr>
<tr class="separator:a5121c90d3bd745afd8264fef2ef39ace"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a690a5585de21ce82495e139ec1dfdf9d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="yubihsm_8h.html#a690a5585de21ce82495e139ec1dfdf9d">yh_util_sign_eddsa</a> (<a class="el" href="yubihsm_8h.html#aa3420d8ccc1fb0b0dee1af5a53cc79de">yh_session</a> *session, uint16_t key_id, const uint8_t *in, size_t in_len, uint8_t *out, size_t *out_len)</td></tr>
<tr class="memdesc:a690a5585de21ce82495e139ec1dfdf9d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sign data using EdDSA.  <a href="#a690a5585de21ce82495e139ec1dfdf9d">More...</a><br /></td></tr>
<tr class="separator:a690a5585de21ce82495e139ec1dfdf9d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9000d43fe8cf7313b319f316521eb0c4"><td class="memItemLeft" align="right" valign="top"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="yubihsm_8h.html#a9000d43fe8cf7313b319f316521eb0c4">yh_util_sign_hmac</a> (<a class="el" href="yubihsm_8h.html#aa3420d8ccc1fb0b0dee1af5a53cc79de">yh_session</a> *session, uint16_t key_id, const uint8_t *in, size_t in_len, uint8_t *out, size_t *out_len)</td></tr>
<tr class="memdesc:a9000d43fe8cf7313b319f316521eb0c4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sign data using HMAC.  <a href="#a9000d43fe8cf7313b319f316521eb0c4">More...</a><br /></td></tr>
<tr class="separator:a9000d43fe8cf7313b319f316521eb0c4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af1bc8ed34687d83701eb3cc673ad4b96"><td class="memItemLeft" align="right" valign="top"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="yubihsm_8h.html#af1bc8ed34687d83701eb3cc673ad4b96">yh_util_get_pseudo_random</a> (<a class="el" href="yubihsm_8h.html#aa3420d8ccc1fb0b0dee1af5a53cc79de">yh_session</a> *session, size_t len, uint8_t *out, size_t *out_len)</td></tr>
<tr class="memdesc:af1bc8ed34687d83701eb3cc673ad4b96"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get a fixed number of pseudo-random bytes from the device.  <a href="#af1bc8ed34687d83701eb3cc673ad4b96">More...</a><br /></td></tr>
<tr class="separator:af1bc8ed34687d83701eb3cc673ad4b96"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab0ca24007ce6942d2185859560c43e8a"><td class="memItemLeft" align="right" valign="top"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="yubihsm_8h.html#ab0ca24007ce6942d2185859560c43e8a">yh_util_import_rsa_key</a> (<a class="el" href="yubihsm_8h.html#aa3420d8ccc1fb0b0dee1af5a53cc79de">yh_session</a> *session, uint16_t *key_id, const char *label, uint16_t domains, const <a class="el" href="structyh__capabilities.html">yh_capabilities</a> *capabilities, <a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55ca">yh_algorithm</a> algorithm, const uint8_t *p, const uint8_t *q)</td></tr>
<tr class="memdesc:ab0ca24007ce6942d2185859560c43e8a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Import an RSA key into the device.  <a href="#ab0ca24007ce6942d2185859560c43e8a">More...</a><br /></td></tr>
<tr class="separator:ab0ca24007ce6942d2185859560c43e8a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adc142d8f397eee024b3c145fa8abad85"><td class="memItemLeft" align="right" valign="top"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="yubihsm_8h.html#adc142d8f397eee024b3c145fa8abad85">yh_util_import_ec_key</a> (<a class="el" href="yubihsm_8h.html#aa3420d8ccc1fb0b0dee1af5a53cc79de">yh_session</a> *session, uint16_t *key_id, const char *label, uint16_t domains, const <a class="el" href="structyh__capabilities.html">yh_capabilities</a> *capabilities, <a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55ca">yh_algorithm</a> algorithm, const uint8_t *s)</td></tr>
<tr class="memdesc:adc142d8f397eee024b3c145fa8abad85"><td class="mdescLeft">&#160;</td><td class="mdescRight">Import an Elliptic Curve key into the device.  <a href="#adc142d8f397eee024b3c145fa8abad85">More...</a><br /></td></tr>
<tr class="separator:adc142d8f397eee024b3c145fa8abad85"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7a886e052bc1571f24c6b7f0c57e2d8c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="yubihsm_8h.html#a7a886e052bc1571f24c6b7f0c57e2d8c">yh_util_import_ed_key</a> (<a class="el" href="yubihsm_8h.html#aa3420d8ccc1fb0b0dee1af5a53cc79de">yh_session</a> *session, uint16_t *key_id, const char *label, uint16_t domains, const <a class="el" href="structyh__capabilities.html">yh_capabilities</a> *capabilities, <a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55ca">yh_algorithm</a> algorithm, const uint8_t *k)</td></tr>
<tr class="memdesc:a7a886e052bc1571f24c6b7f0c57e2d8c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Import an ED key into the device.  <a href="#a7a886e052bc1571f24c6b7f0c57e2d8c">More...</a><br /></td></tr>
<tr class="separator:a7a886e052bc1571f24c6b7f0c57e2d8c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a19c79faaf10c405864f0179821d551a5"><td class="memItemLeft" align="right" valign="top"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="yubihsm_8h.html#a19c79faaf10c405864f0179821d551a5">yh_util_import_hmac_key</a> (<a class="el" href="yubihsm_8h.html#aa3420d8ccc1fb0b0dee1af5a53cc79de">yh_session</a> *session, uint16_t *key_id, const char *label, uint16_t domains, const <a class="el" href="structyh__capabilities.html">yh_capabilities</a> *capabilities, <a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55ca">yh_algorithm</a> algorithm, const uint8_t *key, size_t key_len)</td></tr>
<tr class="memdesc:a19c79faaf10c405864f0179821d551a5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Import an HMAC key into the device.  <a href="#a19c79faaf10c405864f0179821d551a5">More...</a><br /></td></tr>
<tr class="separator:a19c79faaf10c405864f0179821d551a5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab1c62ef2643184a8ad44c569c87712d1"><td class="memItemLeft" align="right" valign="top"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="yubihsm_8h.html#ab1c62ef2643184a8ad44c569c87712d1">yh_util_generate_rsa_key</a> (<a class="el" href="yubihsm_8h.html#aa3420d8ccc1fb0b0dee1af5a53cc79de">yh_session</a> *session, uint16_t *key_id, const char *label, uint16_t domains, const <a class="el" href="structyh__capabilities.html">yh_capabilities</a> *capabilities, <a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55ca">yh_algorithm</a> algorithm)</td></tr>
<tr class="memdesc:ab1c62ef2643184a8ad44c569c87712d1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Generate an RSA key in the device.  <a href="#ab1c62ef2643184a8ad44c569c87712d1">More...</a><br /></td></tr>
<tr class="separator:ab1c62ef2643184a8ad44c569c87712d1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2db9bbd57a908c5c454fc6254f57dcff"><td class="memItemLeft" align="right" valign="top"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="yubihsm_8h.html#a2db9bbd57a908c5c454fc6254f57dcff">yh_util_generate_ec_key</a> (<a class="el" href="yubihsm_8h.html#aa3420d8ccc1fb0b0dee1af5a53cc79de">yh_session</a> *session, uint16_t *key_id, const char *label, uint16_t domains, const <a class="el" href="structyh__capabilities.html">yh_capabilities</a> *capabilities, <a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55ca">yh_algorithm</a> algorithm)</td></tr>
<tr class="memdesc:a2db9bbd57a908c5c454fc6254f57dcff"><td class="mdescLeft">&#160;</td><td class="mdescRight">Generate an Elliptic Curve key in the device.  <a href="#a2db9bbd57a908c5c454fc6254f57dcff">More...</a><br /></td></tr>
<tr class="separator:a2db9bbd57a908c5c454fc6254f57dcff"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a41f4326fe736e99302442d6a6109edbc"><td class="memItemLeft" align="right" valign="top"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="yubihsm_8h.html#a41f4326fe736e99302442d6a6109edbc">yh_util_generate_ed_key</a> (<a class="el" href="yubihsm_8h.html#aa3420d8ccc1fb0b0dee1af5a53cc79de">yh_session</a> *session, uint16_t *key_id, const char *label, uint16_t domains, const <a class="el" href="structyh__capabilities.html">yh_capabilities</a> *capabilities, <a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55ca">yh_algorithm</a> algorithm)</td></tr>
<tr class="memdesc:a41f4326fe736e99302442d6a6109edbc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Generate an ED key in the device.  <a href="#a41f4326fe736e99302442d6a6109edbc">More...</a><br /></td></tr>
<tr class="separator:a41f4326fe736e99302442d6a6109edbc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab37ae2f7fc6857b420e173284130686d"><td class="memItemLeft" align="right" valign="top"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="yubihsm_8h.html#ab37ae2f7fc6857b420e173284130686d">yh_util_verify_hmac</a> (<a class="el" href="yubihsm_8h.html#aa3420d8ccc1fb0b0dee1af5a53cc79de">yh_session</a> *session, uint16_t key_id, const uint8_t *signature, size_t signature_len, const uint8_t *data, size_t data_len, bool *verified)</td></tr>
<tr class="memdesc:ab37ae2f7fc6857b420e173284130686d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Verify a generated HMAC.  <a href="#ab37ae2f7fc6857b420e173284130686d">More...</a><br /></td></tr>
<tr class="separator:ab37ae2f7fc6857b420e173284130686d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1eac22853548b7ceab92550c22233b18"><td class="memItemLeft" align="right" valign="top"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="yubihsm_8h.html#a1eac22853548b7ceab92550c22233b18">yh_util_generate_hmac_key</a> (<a class="el" href="yubihsm_8h.html#aa3420d8ccc1fb0b0dee1af5a53cc79de">yh_session</a> *session, uint16_t *key_id, const char *label, uint16_t domains, const <a class="el" href="structyh__capabilities.html">yh_capabilities</a> *capabilities, <a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55ca">yh_algorithm</a> algorithm)</td></tr>
<tr class="memdesc:a1eac22853548b7ceab92550c22233b18"><td class="mdescLeft">&#160;</td><td class="mdescRight">Generate an HMAC key in the device.  <a href="#a1eac22853548b7ceab92550c22233b18">More...</a><br /></td></tr>
<tr class="separator:a1eac22853548b7ceab92550c22233b18"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5ebf6932cd2e68b9a23787c27fde3e26"><td class="memItemLeft" align="right" valign="top"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="yubihsm_8h.html#a5ebf6932cd2e68b9a23787c27fde3e26">yh_util_decrypt_pkcs1v1_5</a> (<a class="el" href="yubihsm_8h.html#aa3420d8ccc1fb0b0dee1af5a53cc79de">yh_session</a> *session, uint16_t key_id, const uint8_t *in, size_t in_len, uint8_t *out, size_t *out_len)</td></tr>
<tr class="memdesc:a5ebf6932cd2e68b9a23787c27fde3e26"><td class="mdescLeft">&#160;</td><td class="mdescRight">Decrypt data that was encrypted using RSA-PKCS#1v1.5.  <a href="#a5ebf6932cd2e68b9a23787c27fde3e26">More...</a><br /></td></tr>
<tr class="separator:a5ebf6932cd2e68b9a23787c27fde3e26"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa939f8764ed0cca27884d9c8f640ac14"><td class="memItemLeft" align="right" valign="top"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="yubihsm_8h.html#aa939f8764ed0cca27884d9c8f640ac14">yh_util_decrypt_oaep</a> (<a class="el" href="yubihsm_8h.html#aa3420d8ccc1fb0b0dee1af5a53cc79de">yh_session</a> *session, uint16_t key_id, const uint8_t *in, size_t in_len, uint8_t *out, size_t *out_len, const uint8_t *label, size_t label_len, <a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55ca">yh_algorithm</a> mgf1Algo)</td></tr>
<tr class="memdesc:aa939f8764ed0cca27884d9c8f640ac14"><td class="mdescLeft">&#160;</td><td class="mdescRight">Decrypt data using RSA-OAEP.  <a href="#aa939f8764ed0cca27884d9c8f640ac14">More...</a><br /></td></tr>
<tr class="separator:aa939f8764ed0cca27884d9c8f640ac14"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2900aee87732f9ec017bd1662bcef7e9"><td class="memItemLeft" align="right" valign="top"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="yubihsm_8h.html#a2900aee87732f9ec017bd1662bcef7e9">yh_util_derive_ecdh</a> (<a class="el" href="yubihsm_8h.html#aa3420d8ccc1fb0b0dee1af5a53cc79de">yh_session</a> *session, uint16_t key_id, const uint8_t *in, size_t in_len, uint8_t *out, size_t *out_len)</td></tr>
<tr class="memdesc:a2900aee87732f9ec017bd1662bcef7e9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Derive an ECDH key from a private EC key on the device and a provided public EC key.  <a href="#a2900aee87732f9ec017bd1662bcef7e9">More...</a><br /></td></tr>
<tr class="separator:a2900aee87732f9ec017bd1662bcef7e9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae736702f9463878db4adfd45b6a597f9"><td class="memItemLeft" align="right" valign="top"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="yubihsm_8h.html#ae736702f9463878db4adfd45b6a597f9">yh_util_delete_object</a> (<a class="el" href="yubihsm_8h.html#aa3420d8ccc1fb0b0dee1af5a53cc79de">yh_session</a> *session, uint16_t id, <a class="el" href="yubihsm_8h.html#a2fe39512cb4df34b270a67dbb8e13583">yh_object_type</a> type)</td></tr>
<tr class="memdesc:ae736702f9463878db4adfd45b6a597f9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Delete an object in the device.  <a href="#ae736702f9463878db4adfd45b6a597f9">More...</a><br /></td></tr>
<tr class="separator:ae736702f9463878db4adfd45b6a597f9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa3f473e6dbb9188ad0269b40921c4f5f"><td class="memItemLeft" align="right" valign="top"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="yubihsm_8h.html#aa3f473e6dbb9188ad0269b40921c4f5f">yh_util_export_wrapped</a> (<a class="el" href="yubihsm_8h.html#aa3420d8ccc1fb0b0dee1af5a53cc79de">yh_session</a> *session, uint16_t wrapping_key_id, <a class="el" href="yubihsm_8h.html#a2fe39512cb4df34b270a67dbb8e13583">yh_object_type</a> target_type, uint16_t target_id, uint8_t *out, size_t *out_len)</td></tr>
<tr class="memdesc:aa3f473e6dbb9188ad0269b40921c4f5f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Export an object under wrap from the device.  <a href="#aa3f473e6dbb9188ad0269b40921c4f5f">More...</a><br /></td></tr>
<tr class="separator:aa3f473e6dbb9188ad0269b40921c4f5f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae5bf13f9558bb0340468b722accf94d3"><td class="memItemLeft" align="right" valign="top"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="yubihsm_8h.html#ae5bf13f9558bb0340468b722accf94d3">yh_util_import_wrapped</a> (<a class="el" href="yubihsm_8h.html#aa3420d8ccc1fb0b0dee1af5a53cc79de">yh_session</a> *session, uint16_t wrapping_key_id, const uint8_t *in, size_t in_len, <a class="el" href="yubihsm_8h.html#a2fe39512cb4df34b270a67dbb8e13583">yh_object_type</a> *target_type, uint16_t *target_id)</td></tr>
<tr class="memdesc:ae5bf13f9558bb0340468b722accf94d3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Import a wrapped object into the device.  <a href="#ae5bf13f9558bb0340468b722accf94d3">More...</a><br /></td></tr>
<tr class="separator:ae5bf13f9558bb0340468b722accf94d3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3a9729ea5b2e299a735b43f2b23e50a7"><td class="memItemLeft" align="right" valign="top"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="yubihsm_8h.html#a3a9729ea5b2e299a735b43f2b23e50a7">yh_util_import_wrap_key</a> (<a class="el" href="yubihsm_8h.html#aa3420d8ccc1fb0b0dee1af5a53cc79de">yh_session</a> *session, uint16_t *key_id, const char *label, uint16_t domains, const <a class="el" href="structyh__capabilities.html">yh_capabilities</a> *capabilities, <a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55ca">yh_algorithm</a> algorithm, const <a class="el" href="structyh__capabilities.html">yh_capabilities</a> *delegated_capabilities, const uint8_t *in, size_t in_len)</td></tr>
<tr class="memdesc:a3a9729ea5b2e299a735b43f2b23e50a7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Import a Wrap Key into the device.  <a href="#a3a9729ea5b2e299a735b43f2b23e50a7">More...</a><br /></td></tr>
<tr class="separator:a3a9729ea5b2e299a735b43f2b23e50a7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1f749a696792e7911844629e056d9c15"><td class="memItemLeft" align="right" valign="top"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="yubihsm_8h.html#a1f749a696792e7911844629e056d9c15">yh_util_generate_wrap_key</a> (<a class="el" href="yubihsm_8h.html#aa3420d8ccc1fb0b0dee1af5a53cc79de">yh_session</a> *session, uint16_t *key_id, const char *label, uint16_t domains, const <a class="el" href="structyh__capabilities.html">yh_capabilities</a> *capabilities, <a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55ca">yh_algorithm</a> algorithm, const <a class="el" href="structyh__capabilities.html">yh_capabilities</a> *delegated_capabilities)</td></tr>
<tr class="memdesc:a1f749a696792e7911844629e056d9c15"><td class="mdescLeft">&#160;</td><td class="mdescRight">Generate a Wrap Key that can be used for export, import, wrap data and unwrap data in the device.  <a href="#a1f749a696792e7911844629e056d9c15">More...</a><br /></td></tr>
<tr class="separator:a1f749a696792e7911844629e056d9c15"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5ae52ad56b7e83baeb33b46104263aa6"><td class="memItemLeft" align="right" valign="top"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="yubihsm_8h.html#a5ae52ad56b7e83baeb33b46104263aa6">yh_util_get_log_entries</a> (<a class="el" href="yubihsm_8h.html#aa3420d8ccc1fb0b0dee1af5a53cc79de">yh_session</a> *session, uint16_t *unlogged_boot, uint16_t *unlogged_auth, <a class="el" href="structyh__log__entry.html">yh_log_entry</a> *out, size_t *n_items)</td></tr>
<tr class="memdesc:a5ae52ad56b7e83baeb33b46104263aa6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get audit logs from the device.  <a href="#a5ae52ad56b7e83baeb33b46104263aa6">More...</a><br /></td></tr>
<tr class="separator:a5ae52ad56b7e83baeb33b46104263aa6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9d844855c9066bbea0e4344978dd7fdc"><td class="memItemLeft" align="right" valign="top"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="yubihsm_8h.html#a9d844855c9066bbea0e4344978dd7fdc">yh_util_set_log_index</a> (<a class="el" href="yubihsm_8h.html#aa3420d8ccc1fb0b0dee1af5a53cc79de">yh_session</a> *session, uint16_t index)</td></tr>
<tr class="memdesc:a9d844855c9066bbea0e4344978dd7fdc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the index of the last extracted log entry.  <a href="#a9d844855c9066bbea0e4344978dd7fdc">More...</a><br /></td></tr>
<tr class="separator:a9d844855c9066bbea0e4344978dd7fdc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a56e060e71fb8baa0531b3a20848abf37"><td class="memItemLeft" align="right" valign="top"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="yubihsm_8h.html#a56e060e71fb8baa0531b3a20848abf37">yh_util_get_opaque</a> (<a class="el" href="yubihsm_8h.html#aa3420d8ccc1fb0b0dee1af5a53cc79de">yh_session</a> *session, uint16_t object_id, uint8_t *out, size_t *out_len)</td></tr>
<tr class="memdesc:a56e060e71fb8baa0531b3a20848abf37"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get an <a class="el" href="yubihsm_8h.html#a2fe39512cb4df34b270a67dbb8e13583a5d37b7418d50b420621e6a6eb2700de4" title="Opaque Object is an unchecked kind of Object, normally used to store raw data in the device...">YH_OPAQUE</a> object (like an X.509 certificate) from the device.  <a href="#a56e060e71fb8baa0531b3a20848abf37">More...</a><br /></td></tr>
<tr class="separator:a56e060e71fb8baa0531b3a20848abf37"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1249c920eec24f634d04eaafb90a1ca2"><td class="memItemLeft" align="right" valign="top"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="yubihsm_8h.html#a1249c920eec24f634d04eaafb90a1ca2">yh_util_import_opaque</a> (<a class="el" href="yubihsm_8h.html#aa3420d8ccc1fb0b0dee1af5a53cc79de">yh_session</a> *session, uint16_t *object_id, const char *label, uint16_t domains, const <a class="el" href="structyh__capabilities.html">yh_capabilities</a> *capabilities, <a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55ca">yh_algorithm</a> algorithm, const uint8_t *in, size_t in_len)</td></tr>
<tr class="memdesc:a1249c920eec24f634d04eaafb90a1ca2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Import an <a class="el" href="yubihsm_8h.html#a2fe39512cb4df34b270a67dbb8e13583a5d37b7418d50b420621e6a6eb2700de4" title="Opaque Object is an unchecked kind of Object, normally used to store raw data in the device...">YH_OPAQUE</a> object into the device.  <a href="#a1249c920eec24f634d04eaafb90a1ca2">More...</a><br /></td></tr>
<tr class="separator:a1249c920eec24f634d04eaafb90a1ca2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a45c32b993856be818a70c0ffad589cbd"><td class="memItemLeft" align="right" valign="top"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="yubihsm_8h.html#a45c32b993856be818a70c0ffad589cbd">yh_util_sign_ssh_certificate</a> (<a class="el" href="yubihsm_8h.html#aa3420d8ccc1fb0b0dee1af5a53cc79de">yh_session</a> *session, uint16_t key_id, uint16_t template_id, <a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55ca">yh_algorithm</a> sig_algo, const uint8_t *in, size_t in_len, uint8_t *out, size_t *out_len)</td></tr>
<tr class="memdesc:a45c32b993856be818a70c0ffad589cbd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sign an SSH Certificate request.  <a href="#a45c32b993856be818a70c0ffad589cbd">More...</a><br /></td></tr>
<tr class="separator:a45c32b993856be818a70c0ffad589cbd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac154da7ac6dc0a7b4b3a6cdff9433da8"><td class="memItemLeft" align="right" valign="top"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="yubihsm_8h.html#ac154da7ac6dc0a7b4b3a6cdff9433da8">yh_util_import_authentication_key</a> (<a class="el" href="yubihsm_8h.html#aa3420d8ccc1fb0b0dee1af5a53cc79de">yh_session</a> *session, uint16_t *key_id, const char *label, uint16_t domains, const <a class="el" href="structyh__capabilities.html">yh_capabilities</a> *capabilities, const <a class="el" href="structyh__capabilities.html">yh_capabilities</a> *delegated_capabilities, const uint8_t *key_enc, size_t key_enc_len, const uint8_t *key_mac, size_t key_mac_len)</td></tr>
<tr class="memdesc:ac154da7ac6dc0a7b4b3a6cdff9433da8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Import an <a class="el" href="yubihsm_8h.html#a2fe39512cb4df34b270a67dbb8e13583acee44b775b3c5b6157f0732699935074" title="Authentication Key is used to establish Sessions with a device. ">YH_AUTHENTICATION_KEY</a> into the device.  <a href="#ac154da7ac6dc0a7b4b3a6cdff9433da8">More...</a><br /></td></tr>
<tr class="separator:ac154da7ac6dc0a7b4b3a6cdff9433da8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a80b4c4caeb9c768737c2dbf46d9352e4"><td class="memItemLeft" align="right" valign="top"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="yubihsm_8h.html#a80b4c4caeb9c768737c2dbf46d9352e4">yh_util_import_authentication_key_derived</a> (<a class="el" href="yubihsm_8h.html#aa3420d8ccc1fb0b0dee1af5a53cc79de">yh_session</a> *session, uint16_t *key_id, const char *label, uint16_t domains, const <a class="el" href="structyh__capabilities.html">yh_capabilities</a> *capabilities, const <a class="el" href="structyh__capabilities.html">yh_capabilities</a> *delegated_capabilities, const uint8_t *password, size_t password_len)</td></tr>
<tr class="memdesc:a80b4c4caeb9c768737c2dbf46d9352e4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Import an <a class="el" href="yubihsm_8h.html#a2fe39512cb4df34b270a67dbb8e13583acee44b775b3c5b6157f0732699935074" title="Authentication Key is used to establish Sessions with a device. ">YH_AUTHENTICATION_KEY</a> with long lived keys derived from a password.  <a href="#a80b4c4caeb9c768737c2dbf46d9352e4">More...</a><br /></td></tr>
<tr class="separator:a80b4c4caeb9c768737c2dbf46d9352e4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8f229874e387887d7c5b4c7e6e07db8e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="yubihsm_8h.html#a8f229874e387887d7c5b4c7e6e07db8e">yh_util_change_authentication_key</a> (<a class="el" href="yubihsm_8h.html#aa3420d8ccc1fb0b0dee1af5a53cc79de">yh_session</a> *session, uint16_t *key_id, const uint8_t *key_enc, size_t key_enc_len, const uint8_t *key_mac, size_t key_mac_len)</td></tr>
<tr class="memdesc:a8f229874e387887d7c5b4c7e6e07db8e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Replace the long lived encryption key and MAC key associated with an <a class="el" href="yubihsm_8h.html#a2fe39512cb4df34b270a67dbb8e13583acee44b775b3c5b6157f0732699935074" title="Authentication Key is used to establish Sessions with a device. ">YH_AUTHENTICATION_KEY</a> in the device.  <a href="#a8f229874e387887d7c5b4c7e6e07db8e">More...</a><br /></td></tr>
<tr class="separator:a8f229874e387887d7c5b4c7e6e07db8e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8761bd8bcffcee4af737bda255ce5e53"><td class="memItemLeft" align="right" valign="top"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="yubihsm_8h.html#a8761bd8bcffcee4af737bda255ce5e53">yh_util_change_authentication_key_derived</a> (<a class="el" href="yubihsm_8h.html#aa3420d8ccc1fb0b0dee1af5a53cc79de">yh_session</a> *session, uint16_t *key_id, const uint8_t *password, size_t password_len)</td></tr>
<tr class="memdesc:a8761bd8bcffcee4af737bda255ce5e53"><td class="mdescLeft">&#160;</td><td class="mdescRight">Replace the long lived encryption key and MAC key associated with an <a class="el" href="yubihsm_8h.html#a2fe39512cb4df34b270a67dbb8e13583acee44b775b3c5b6157f0732699935074" title="Authentication Key is used to establish Sessions with a device. ">YH_AUTHENTICATION_KEY</a> in the device with keys derived from a password.  <a href="#a8761bd8bcffcee4af737bda255ce5e53">More...</a><br /></td></tr>
<tr class="separator:a8761bd8bcffcee4af737bda255ce5e53"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a47768ae0e72beba49f02db1baddf4823"><td class="memItemLeft" align="right" valign="top"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="yubihsm_8h.html#a47768ae0e72beba49f02db1baddf4823">yh_util_get_template</a> (<a class="el" href="yubihsm_8h.html#aa3420d8ccc1fb0b0dee1af5a53cc79de">yh_session</a> *session, uint16_t object_id, uint8_t *out, size_t *out_len)</td></tr>
<tr class="memdesc:a47768ae0e72beba49f02db1baddf4823"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get a <a class="el" href="yubihsm_8h.html#a2fe39512cb4df34b270a67dbb8e13583a96244762de5ce4175e60157239e7a097" title="Template is a binary object used for example to validate SSH certificate requests. ">YH_TEMPLATE</a> object from the device.  <a href="#a47768ae0e72beba49f02db1baddf4823">More...</a><br /></td></tr>
<tr class="separator:a47768ae0e72beba49f02db1baddf4823"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae0fc8d6520950868365011d1a9f450f1"><td class="memItemLeft" align="right" valign="top"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="yubihsm_8h.html#ae0fc8d6520950868365011d1a9f450f1">yh_util_import_template</a> (<a class="el" href="yubihsm_8h.html#aa3420d8ccc1fb0b0dee1af5a53cc79de">yh_session</a> *session, uint16_t *object_id, const char *label, uint16_t domains, const <a class="el" href="structyh__capabilities.html">yh_capabilities</a> *capabilities, <a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55ca">yh_algorithm</a> algorithm, const uint8_t *in, size_t in_len)</td></tr>
<tr class="memdesc:ae0fc8d6520950868365011d1a9f450f1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Import a <a class="el" href="yubihsm_8h.html#a2fe39512cb4df34b270a67dbb8e13583a96244762de5ce4175e60157239e7a097" title="Template is a binary object used for example to validate SSH certificate requests. ">YH_TEMPLATE</a> object into the device.  <a href="#ae0fc8d6520950868365011d1a9f450f1">More...</a><br /></td></tr>
<tr class="separator:ae0fc8d6520950868365011d1a9f450f1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a82d295a02d9eb628f6dea4b4c01fdec4"><td class="memItemLeft" align="right" valign="top"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="yubihsm_8h.html#a82d295a02d9eb628f6dea4b4c01fdec4">yh_util_create_otp_aead</a> (<a class="el" href="yubihsm_8h.html#aa3420d8ccc1fb0b0dee1af5a53cc79de">yh_session</a> *session, uint16_t key_id, const uint8_t *key, const uint8_t *private_id, uint8_t *out, size_t *out_len)</td></tr>
<tr class="memdesc:a82d295a02d9eb628f6dea4b4c01fdec4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create a Yubico OTP AEAD using the provided data.  <a href="#a82d295a02d9eb628f6dea4b4c01fdec4">More...</a><br /></td></tr>
<tr class="separator:a82d295a02d9eb628f6dea4b4c01fdec4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4bb1d420f681bc91bd36dc08695dbad6"><td class="memItemLeft" align="right" valign="top"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="yubihsm_8h.html#a4bb1d420f681bc91bd36dc08695dbad6">yh_util_randomize_otp_aead</a> (<a class="el" href="yubihsm_8h.html#aa3420d8ccc1fb0b0dee1af5a53cc79de">yh_session</a> *session, uint16_t key_id, uint8_t *out, size_t *out_len)</td></tr>
<tr class="memdesc:a4bb1d420f681bc91bd36dc08695dbad6"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create OTP AEAD from random data.  <a href="#a4bb1d420f681bc91bd36dc08695dbad6">More...</a><br /></td></tr>
<tr class="separator:a4bb1d420f681bc91bd36dc08695dbad6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3677afe2209a1cae31f70a304e260e28"><td class="memItemLeft" align="right" valign="top"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="yubihsm_8h.html#a3677afe2209a1cae31f70a304e260e28">yh_util_decrypt_otp</a> (<a class="el" href="yubihsm_8h.html#aa3420d8ccc1fb0b0dee1af5a53cc79de">yh_session</a> *session, uint16_t key_id, const uint8_t *aead, size_t aead_len, const uint8_t *otp, uint16_t *useCtr, uint8_t *sessionCtr, uint8_t *tstph, uint16_t *tstpl)</td></tr>
<tr class="memdesc:a3677afe2209a1cae31f70a304e260e28"><td class="mdescLeft">&#160;</td><td class="mdescRight">Decrypt a Yubico OTP and return counters and time information.  <a href="#a3677afe2209a1cae31f70a304e260e28">More...</a><br /></td></tr>
<tr class="separator:a3677afe2209a1cae31f70a304e260e28"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:addc22271306d847f53321984f41d818b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="yubihsm_8h.html#addc22271306d847f53321984f41d818b">yh_util_import_otp_aead_key</a> (<a class="el" href="yubihsm_8h.html#aa3420d8ccc1fb0b0dee1af5a53cc79de">yh_session</a> *session, uint16_t *key_id, const char *label, uint16_t domains, const <a class="el" href="structyh__capabilities.html">yh_capabilities</a> *capabilities, uint32_t nonce_id, const uint8_t *in, size_t in_len)</td></tr>
<tr class="memdesc:addc22271306d847f53321984f41d818b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Import an <a class="el" href="yubihsm_8h.html#a2fe39512cb4df34b270a67dbb8e13583a02c5f683fde147de6a9e1043f971f5f0" title="OTP AEAD Key is a secret key used to decrypt Yubico OTP values. ">YH_OTP_AEAD_KEY</a> used for Yubico OTP Decryption.  <a href="#addc22271306d847f53321984f41d818b">More...</a><br /></td></tr>
<tr class="separator:addc22271306d847f53321984f41d818b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9e130d225a8dc003d7a7c0ce4b8ea5e4"><td class="memItemLeft" align="right" valign="top"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="yubihsm_8h.html#a9e130d225a8dc003d7a7c0ce4b8ea5e4">yh_util_generate_otp_aead_key</a> (<a class="el" href="yubihsm_8h.html#aa3420d8ccc1fb0b0dee1af5a53cc79de">yh_session</a> *session, uint16_t *key_id, const char *label, uint16_t domains, const <a class="el" href="structyh__capabilities.html">yh_capabilities</a> *capabilities, <a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55ca">yh_algorithm</a> algorithm, uint32_t nonce_id)</td></tr>
<tr class="memdesc:a9e130d225a8dc003d7a7c0ce4b8ea5e4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Generate an <a class="el" href="yubihsm_8h.html#a2fe39512cb4df34b270a67dbb8e13583a02c5f683fde147de6a9e1043f971f5f0" title="OTP AEAD Key is a secret key used to decrypt Yubico OTP values. ">YH_OTP_AEAD_KEY</a> for Yubico OTP decryption in the device.  <a href="#a9e130d225a8dc003d7a7c0ce4b8ea5e4">More...</a><br /></td></tr>
<tr class="separator:a9e130d225a8dc003d7a7c0ce4b8ea5e4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5988faffd97366b188728ff1a7fb6e89"><td class="memItemLeft" align="right" valign="top"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="yubihsm_8h.html#a5988faffd97366b188728ff1a7fb6e89">yh_util_sign_attestation_certificate</a> (<a class="el" href="yubihsm_8h.html#aa3420d8ccc1fb0b0dee1af5a53cc79de">yh_session</a> *session, uint16_t key_id, uint16_t attest_id, uint8_t *out, size_t *out_len)</td></tr>
<tr class="memdesc:a5988faffd97366b188728ff1a7fb6e89"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get attestation of an Asymmetric Key in the form of an X.509 certificate.  <a href="#a5988faffd97366b188728ff1a7fb6e89">More...</a><br /></td></tr>
<tr class="separator:a5988faffd97366b188728ff1a7fb6e89"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a85ac840aec77cb1ca3c3ce1f2ab26282"><td class="memItemLeft" align="right" valign="top"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="yubihsm_8h.html#a85ac840aec77cb1ca3c3ce1f2ab26282">yh_util_set_option</a> (<a class="el" href="yubihsm_8h.html#aa3420d8ccc1fb0b0dee1af5a53cc79de">yh_session</a> *session, <a class="el" href="yubihsm_8h.html#acc8090ce0ec5029b376803e44b1cb4aa">yh_option</a> option, size_t len, uint8_t *val)</td></tr>
<tr class="memdesc:a85ac840aec77cb1ca3c3ce1f2ab26282"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set a device-global option.  <a href="#a85ac840aec77cb1ca3c3ce1f2ab26282">More...</a><br /></td></tr>
<tr class="separator:a85ac840aec77cb1ca3c3ce1f2ab26282"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a11871e03c808e2d25737f893e58ed094"><td class="memItemLeft" align="right" valign="top"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="yubihsm_8h.html#a11871e03c808e2d25737f893e58ed094">yh_util_get_option</a> (<a class="el" href="yubihsm_8h.html#aa3420d8ccc1fb0b0dee1af5a53cc79de">yh_session</a> *session, <a class="el" href="yubihsm_8h.html#acc8090ce0ec5029b376803e44b1cb4aa">yh_option</a> option, uint8_t *out, size_t *out_len)</td></tr>
<tr class="memdesc:a11871e03c808e2d25737f893e58ed094"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get a device-global option.  <a href="#a11871e03c808e2d25737f893e58ed094">More...</a><br /></td></tr>
<tr class="separator:a11871e03c808e2d25737f893e58ed094"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae87d5578703775b9d4151a14435f4a73"><td class="memItemLeft" align="right" valign="top"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="yubihsm_8h.html#ae87d5578703775b9d4151a14435f4a73">yh_util_get_storage_info</a> (<a class="el" href="yubihsm_8h.html#aa3420d8ccc1fb0b0dee1af5a53cc79de">yh_session</a> *session, uint16_t *total_records, uint16_t *free_records, uint16_t *total_pages, uint16_t *free_pages, uint16_t *page_size)</td></tr>
<tr class="memdesc:ae87d5578703775b9d4151a14435f4a73"><td class="mdescLeft">&#160;</td><td class="mdescRight">Report currently free storage.  <a href="#ae87d5578703775b9d4151a14435f4a73">More...</a><br /></td></tr>
<tr class="separator:ae87d5578703775b9d4151a14435f4a73"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7c2e101be04ad1546d99d5600e732eca"><td class="memItemLeft" align="right" valign="top"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="yubihsm_8h.html#a7c2e101be04ad1546d99d5600e732eca">yh_util_wrap_data</a> (<a class="el" href="yubihsm_8h.html#aa3420d8ccc1fb0b0dee1af5a53cc79de">yh_session</a> *session, uint16_t key_id, const uint8_t *in, size_t in_len, uint8_t *out, size_t *out_len)</td></tr>
<tr class="memdesc:a7c2e101be04ad1546d99d5600e732eca"><td class="mdescLeft">&#160;</td><td class="mdescRight">Encrypt (wrap) data using a <a class="el" href="yubihsm_8h.html#a2fe39512cb4df34b270a67dbb8e13583a16f0118db1dac3d0732e7d66630e1dba" title="Wrap Key is a secret key used to wrap and unwrap Objects during the export and import process...">YH_WRAP_KEY</a>.  <a href="#a7c2e101be04ad1546d99d5600e732eca">More...</a><br /></td></tr>
<tr class="separator:a7c2e101be04ad1546d99d5600e732eca"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a550567a0f56d8536b9b5f34e905da7ec"><td class="memItemLeft" align="right" valign="top"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="yubihsm_8h.html#a550567a0f56d8536b9b5f34e905da7ec">yh_util_unwrap_data</a> (<a class="el" href="yubihsm_8h.html#aa3420d8ccc1fb0b0dee1af5a53cc79de">yh_session</a> *session, uint16_t key_id, const uint8_t *in, size_t in_len, uint8_t *out, size_t *out_len)</td></tr>
<tr class="memdesc:a550567a0f56d8536b9b5f34e905da7ec"><td class="mdescLeft">&#160;</td><td class="mdescRight">Decrypt (unwrap) data using a <a class="el" href="yubihsm_8h.html#a2fe39512cb4df34b270a67dbb8e13583a16f0118db1dac3d0732e7d66630e1dba" title="Wrap Key is a secret key used to wrap and unwrap Objects during the export and import process...">YH_WRAP_KEY</a>.  <a href="#a550567a0f56d8536b9b5f34e905da7ec">More...</a><br /></td></tr>
<tr class="separator:a550567a0f56d8536b9b5f34e905da7ec"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad112fe09ee88d595333fa87e8059717b"><td class="memItemLeft" align="right" valign="top"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="yubihsm_8h.html#ad112fe09ee88d595333fa87e8059717b">yh_util_blink_device</a> (<a class="el" href="yubihsm_8h.html#aa3420d8ccc1fb0b0dee1af5a53cc79de">yh_session</a> *session, uint8_t seconds)</td></tr>
<tr class="memdesc:ad112fe09ee88d595333fa87e8059717b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Blink the LED of the device to identify it.  <a href="#ad112fe09ee88d595333fa87e8059717b">More...</a><br /></td></tr>
<tr class="separator:ad112fe09ee88d595333fa87e8059717b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5c153fe27877bcc7927d391fb55550af"><td class="memItemLeft" align="right" valign="top"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="yubihsm_8h.html#a5c153fe27877bcc7927d391fb55550af">yh_util_reset_device</a> (<a class="el" href="yubihsm_8h.html#aa3420d8ccc1fb0b0dee1af5a53cc79de">yh_session</a> *session)</td></tr>
<tr class="memdesc:a5c153fe27877bcc7927d391fb55550af"><td class="mdescLeft">&#160;</td><td class="mdescRight">Factory reset the device.  <a href="#a5c153fe27877bcc7927d391fb55550af">More...</a><br /></td></tr>
<tr class="separator:a5c153fe27877bcc7927d391fb55550af"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aeabf472faf1ba8d963b39866e04df6b0"><td class="memItemLeft" align="right" valign="top"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="yubihsm_8h.html#aeabf472faf1ba8d963b39866e04df6b0">yh_get_session_id</a> (<a class="el" href="yubihsm_8h.html#aa3420d8ccc1fb0b0dee1af5a53cc79de">yh_session</a> *session, uint8_t *sid)</td></tr>
<tr class="memdesc:aeabf472faf1ba8d963b39866e04df6b0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the session ID.  <a href="#aeabf472faf1ba8d963b39866e04df6b0">More...</a><br /></td></tr>
<tr class="separator:aeabf472faf1ba8d963b39866e04df6b0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a163506939cedbc1e849bdcfb8b5fe1de"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="yubihsm_8h.html#a163506939cedbc1e849bdcfb8b5fe1de">yh_connector_has_device</a> (<a class="el" href="yubihsm_8h.html#a114f98fee4b67eadd9b89b675632c710">yh_connector</a> *connector)</td></tr>
<tr class="memdesc:a163506939cedbc1e849bdcfb8b5fe1de"><td class="mdescLeft">&#160;</td><td class="mdescRight">Check if the connector has a device connected.  <a href="#a163506939cedbc1e849bdcfb8b5fe1de">More...</a><br /></td></tr>
<tr class="separator:a163506939cedbc1e849bdcfb8b5fe1de"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2b9f4070a103724b241e0a2b6a56d1ba"><td class="memItemLeft" align="right" valign="top"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="yubihsm_8h.html#a2b9f4070a103724b241e0a2b6a56d1ba">yh_get_connector_version</a> (<a class="el" href="yubihsm_8h.html#a114f98fee4b67eadd9b89b675632c710">yh_connector</a> *connector, uint8_t *major, uint8_t *minor, uint8_t *patch)</td></tr>
<tr class="memdesc:a2b9f4070a103724b241e0a2b6a56d1ba"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the connector version.  <a href="#a2b9f4070a103724b241e0a2b6a56d1ba">More...</a><br /></td></tr>
<tr class="separator:a2b9f4070a103724b241e0a2b6a56d1ba"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acb5d5e9a2718b9427269f7d267ca25b9"><td class="memItemLeft" align="right" valign="top"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="yubihsm_8h.html#acb5d5e9a2718b9427269f7d267ca25b9">yh_get_connector_address</a> (<a class="el" href="yubihsm_8h.html#a114f98fee4b67eadd9b89b675632c710">yh_connector</a> *connector, char **const address)</td></tr>
<tr class="memdesc:acb5d5e9a2718b9427269f7d267ca25b9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get connector address.  <a href="#acb5d5e9a2718b9427269f7d267ca25b9">More...</a><br /></td></tr>
<tr class="separator:acb5d5e9a2718b9427269f7d267ca25b9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aab440e1cb671d9ba7a2e7d1243960e42"><td class="memItemLeft" align="right" valign="top"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="yubihsm_8h.html#aab440e1cb671d9ba7a2e7d1243960e42">yh_string_to_capabilities</a> (const char *capability, <a class="el" href="structyh__capabilities.html">yh_capabilities</a> *result)</td></tr>
<tr class="memdesc:aab440e1cb671d9ba7a2e7d1243960e42"><td class="mdescLeft">&#160;</td><td class="mdescRight">Convert capability string to byte array.  <a href="#aab440e1cb671d9ba7a2e7d1243960e42">More...</a><br /></td></tr>
<tr class="separator:aab440e1cb671d9ba7a2e7d1243960e42"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac46bac75dfd0a4358a4e6b432a50e48a"><td class="memItemLeft" align="right" valign="top"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="yubihsm_8h.html#ac46bac75dfd0a4358a4e6b432a50e48a">yh_capabilities_to_strings</a> (const <a class="el" href="structyh__capabilities.html">yh_capabilities</a> *num, const char *result[], size_t *n_result)</td></tr>
<tr class="memdesc:ac46bac75dfd0a4358a4e6b432a50e48a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Convert an array of <a class="el" href="structyh__capabilities.html" title="Capabilities representation. ">yh_capabilities</a> into strings separated by ','.  <a href="#ac46bac75dfd0a4358a4e6b432a50e48a">More...</a><br /></td></tr>
<tr class="separator:ac46bac75dfd0a4358a4e6b432a50e48a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aba384949362ccaf19cbeae3bb046489c"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="yubihsm_8h.html#aba384949362ccaf19cbeae3bb046489c">yh_check_capability</a> (const <a class="el" href="structyh__capabilities.html">yh_capabilities</a> *capabilities, const char *capability)</td></tr>
<tr class="memdesc:aba384949362ccaf19cbeae3bb046489c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Check if a capability is set.  <a href="#aba384949362ccaf19cbeae3bb046489c">More...</a><br /></td></tr>
<tr class="separator:aba384949362ccaf19cbeae3bb046489c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afcca1608845e7a783d41d8ffd6aac8ed"><td class="memItemLeft" align="right" valign="top"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="yubihsm_8h.html#afcca1608845e7a783d41d8ffd6aac8ed">yh_merge_capabilities</a> (const <a class="el" href="structyh__capabilities.html">yh_capabilities</a> *a, const <a class="el" href="structyh__capabilities.html">yh_capabilities</a> *b, <a class="el" href="structyh__capabilities.html">yh_capabilities</a> *result)</td></tr>
<tr class="memdesc:afcca1608845e7a783d41d8ffd6aac8ed"><td class="mdescLeft">&#160;</td><td class="mdescRight">Merge two sets of capabilities.  <a href="#afcca1608845e7a783d41d8ffd6aac8ed">More...</a><br /></td></tr>
<tr class="separator:afcca1608845e7a783d41d8ffd6aac8ed"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a900031f15115ee22e885d2de7ec80a4a"><td class="memItemLeft" align="right" valign="top"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="yubihsm_8h.html#a900031f15115ee22e885d2de7ec80a4a">yh_filter_capabilities</a> (const <a class="el" href="structyh__capabilities.html">yh_capabilities</a> *capabilities, const <a class="el" href="structyh__capabilities.html">yh_capabilities</a> *filter, <a class="el" href="structyh__capabilities.html">yh_capabilities</a> *result)</td></tr>
<tr class="memdesc:a900031f15115ee22e885d2de7ec80a4a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Filter one set of capabilities with another.  <a href="#a900031f15115ee22e885d2de7ec80a4a">More...</a><br /></td></tr>
<tr class="separator:a900031f15115ee22e885d2de7ec80a4a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0a67155f2a7970ecb52e4f6aac6bbe84"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="yubihsm_8h.html#a0a67155f2a7970ecb52e4f6aac6bbe84">yh_is_rsa</a> (<a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55ca">yh_algorithm</a> algorithm)</td></tr>
<tr class="memdesc:a0a67155f2a7970ecb52e4f6aac6bbe84"><td class="mdescLeft">&#160;</td><td class="mdescRight">Check if an algorithm is a supported RSA algorithm.  <a href="#a0a67155f2a7970ecb52e4f6aac6bbe84">More...</a><br /></td></tr>
<tr class="separator:a0a67155f2a7970ecb52e4f6aac6bbe84"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3032a8f45bfad36ed6157b0158dd7921"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="yubihsm_8h.html#a3032a8f45bfad36ed6157b0158dd7921">yh_is_ec</a> (<a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55ca">yh_algorithm</a> algorithm)</td></tr>
<tr class="memdesc:a3032a8f45bfad36ed6157b0158dd7921"><td class="mdescLeft">&#160;</td><td class="mdescRight">Check if an algorithm is a supported Elliptic Curve algorithm.  <a href="#a3032a8f45bfad36ed6157b0158dd7921">More...</a><br /></td></tr>
<tr class="separator:a3032a8f45bfad36ed6157b0158dd7921"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a16fbf4426acbf42695c4ec4738b6ae8a"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="yubihsm_8h.html#a16fbf4426acbf42695c4ec4738b6ae8a">yh_is_ed</a> (<a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55ca">yh_algorithm</a> algorithm)</td></tr>
<tr class="memdesc:a16fbf4426acbf42695c4ec4738b6ae8a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Check if an algorithm is a supported ED algorithm.  <a href="#a16fbf4426acbf42695c4ec4738b6ae8a">More...</a><br /></td></tr>
<tr class="separator:a16fbf4426acbf42695c4ec4738b6ae8a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acb19de78e7d1aed72abbed5c74c676bc"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="yubihsm_8h.html#acb19de78e7d1aed72abbed5c74c676bc">yh_is_hmac</a> (<a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55ca">yh_algorithm</a> algorithm)</td></tr>
<tr class="memdesc:acb19de78e7d1aed72abbed5c74c676bc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Check if algorithm is a supported HMAC algorithm.  <a href="#acb19de78e7d1aed72abbed5c74c676bc">More...</a><br /></td></tr>
<tr class="separator:acb19de78e7d1aed72abbed5c74c676bc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a375000f12ac554eb8cbaa0e6b75c3a08"><td class="memItemLeft" align="right" valign="top"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="yubihsm_8h.html#a375000f12ac554eb8cbaa0e6b75c3a08">yh_get_key_bitlength</a> (<a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55ca">yh_algorithm</a> algorithm, size_t *result)</td></tr>
<tr class="memdesc:a375000f12ac554eb8cbaa0e6b75c3a08"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get the expected key length of a key generated by the given algorithm.  <a href="#a375000f12ac554eb8cbaa0e6b75c3a08">More...</a><br /></td></tr>
<tr class="separator:a375000f12ac554eb8cbaa0e6b75c3a08"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2a0d369611aa795c62645467062a9acb"><td class="memItemLeft" align="right" valign="top"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="yubihsm_8h.html#a2a0d369611aa795c62645467062a9acb">yh_algo_to_string</a> (<a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55ca">yh_algorithm</a> algo, char const **result)</td></tr>
<tr class="memdesc:a2a0d369611aa795c62645467062a9acb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Convert an algorithm to its string representation.  <a href="#a2a0d369611aa795c62645467062a9acb">More...</a><br /></td></tr>
<tr class="separator:a2a0d369611aa795c62645467062a9acb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aad9943d12261cc0f0cada93cbd6d0704"><td class="memItemLeft" align="right" valign="top"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="yubihsm_8h.html#aad9943d12261cc0f0cada93cbd6d0704">yh_string_to_algo</a> (const char *string, <a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55ca">yh_algorithm</a> *algo)</td></tr>
<tr class="memdesc:aad9943d12261cc0f0cada93cbd6d0704"><td class="mdescLeft">&#160;</td><td class="mdescRight">Convert a string to an algorithm's numeric value.  <a href="#aad9943d12261cc0f0cada93cbd6d0704">More...</a><br /></td></tr>
<tr class="separator:aad9943d12261cc0f0cada93cbd6d0704"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afe3d701f7470c1d7b05480e4b6728bf7"><td class="memItemLeft" align="right" valign="top"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="yubihsm_8h.html#afe3d701f7470c1d7b05480e4b6728bf7">yh_type_to_string</a> (<a class="el" href="yubihsm_8h.html#a2fe39512cb4df34b270a67dbb8e13583">yh_object_type</a> type, char const **result)</td></tr>
<tr class="memdesc:afe3d701f7470c1d7b05480e4b6728bf7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Convert a <a class="el" href="yubihsm_8h.html#a2fe39512cb4df34b270a67dbb8e13583" title="Object types. ">yh_object_type</a> to its string representation.  <a href="#afe3d701f7470c1d7b05480e4b6728bf7">More...</a><br /></td></tr>
<tr class="separator:afe3d701f7470c1d7b05480e4b6728bf7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a57cdfa4b6224bd2c4a8bab24513475d8"><td class="memItemLeft" align="right" valign="top"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="yubihsm_8h.html#a57cdfa4b6224bd2c4a8bab24513475d8">yh_string_to_type</a> (const char *string, <a class="el" href="yubihsm_8h.html#a2fe39512cb4df34b270a67dbb8e13583">yh_object_type</a> *type)</td></tr>
<tr class="memdesc:a57cdfa4b6224bd2c4a8bab24513475d8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Convert a string to a type's numeric value.  <a href="#a57cdfa4b6224bd2c4a8bab24513475d8">More...</a><br /></td></tr>
<tr class="separator:a57cdfa4b6224bd2c4a8bab24513475d8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5464c7a6ad858c1e4e42e588b406c2d3"><td class="memItemLeft" align="right" valign="top"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="yubihsm_8h.html#a5464c7a6ad858c1e4e42e588b406c2d3">yh_string_to_option</a> (const char *string, <a class="el" href="yubihsm_8h.html#acc8090ce0ec5029b376803e44b1cb4aa">yh_option</a> *option)</td></tr>
<tr class="memdesc:a5464c7a6ad858c1e4e42e588b406c2d3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Convert a string to an option's numeric value.  <a href="#a5464c7a6ad858c1e4e42e588b406c2d3">More...</a><br /></td></tr>
<tr class="separator:a5464c7a6ad858c1e4e42e588b406c2d3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a00b81c3c9ca2964a672b7b0b725925e4"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="yubihsm_8h.html#a00b81c3c9ca2964a672b7b0b725925e4">yh_verify_logs</a> (<a class="el" href="structyh__log__entry.html">yh_log_entry</a> *logs, size_t n_items, <a class="el" href="structyh__log__entry.html">yh_log_entry</a> *last_previous_log)</td></tr>
<tr class="memdesc:a00b81c3c9ca2964a672b7b0b725925e4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Verify an array of log entries.  <a href="#a00b81c3c9ca2964a672b7b0b725925e4">More...</a><br /></td></tr>
<tr class="separator:a00b81c3c9ca2964a672b7b0b725925e4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a96a4c751a281515d5610adb8fd779438"><td class="memItemLeft" align="right" valign="top"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="yubihsm_8h.html#a96a4c751a281515d5610adb8fd779438">yh_string_to_domains</a> (const char *domains, uint16_t *result)</td></tr>
<tr class="memdesc:a96a4c751a281515d5610adb8fd779438"><td class="mdescLeft">&#160;</td><td class="mdescRight">Convert a string to a domain's numeric value.  <a href="#a96a4c751a281515d5610adb8fd779438">More...</a><br /></td></tr>
<tr class="separator:a96a4c751a281515d5610adb8fd779438"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0100df295f7ecf0d0cc90052aac20586"><td class="memItemLeft" align="right" valign="top"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="yubihsm_8h.html#a0100df295f7ecf0d0cc90052aac20586">yh_domains_to_string</a> (uint16_t domains, char *string, size_t max_len)</td></tr>
<tr class="memdesc:a0100df295f7ecf0d0cc90052aac20586"><td class="mdescLeft">&#160;</td><td class="mdescRight">Convert domains parameter to its String representation.  <a href="#a0100df295f7ecf0d0cc90052aac20586">More...</a><br /></td></tr>
<tr class="separator:a0100df295f7ecf0d0cc90052aac20586"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Everything you need to establish a connection to the YubiHSM 2 and use its functions. </p>
</div><h2 class="groupheader">Macro Definition Documentation</h2>
<a id="a03f1a4cf5b57bc3a4eababaee26aa801"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a03f1a4cf5b57bc3a4eababaee26aa801">&#9670;&nbsp;</a></span>YH_ORIGIN_IMPORTED_WRAPPED</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define YH_ORIGIN_IMPORTED_WRAPPED&#160;&#160;&#160;0x10</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>The object was imported into the device under wrap. </p>
<p>This is used in combination with objects original 'origin' </p>

</div>
</div>
<h2 class="groupheader">Enumeration Type Documentation</h2>
<a id="a498937b5a72accbb0ef21bb1dcdd55ca"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a498937b5a72accbb0ef21bb1dcdd55ca">&#9670;&nbsp;</a></span>yh_algorithm</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55ca">yh_algorithm</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Algorithms. </p>
<dl class="section see"><dt>See also</dt><dd><a href="https://developers.yubico.com/YubiHSM2/Concepts/Algorithms.html">Objects</a> </dd></dl>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="a498937b5a72accbb0ef21bb1dcdd55caa1982e3db182a679514674f454e2b79ad"></a>YH_ALGO_RSA_PKCS1_SHA1&#160;</td><td class="fielddoc"><p>rsa-pkcs1-sha1 </p>
</td></tr>
<tr><td class="fieldname"><a id="a498937b5a72accbb0ef21bb1dcdd55caa18e17370fcf9a829572e57608aff743c"></a>YH_ALGO_RSA_PKCS1_SHA256&#160;</td><td class="fielddoc"><p>rsa-pkcs1-sha256 </p>
</td></tr>
<tr><td class="fieldname"><a id="a498937b5a72accbb0ef21bb1dcdd55caafc78c2f62fe0a185c38d2644755fde2c"></a>YH_ALGO_RSA_PKCS1_SHA384&#160;</td><td class="fielddoc"><p>rsa-pkcs1-sha384 </p>
</td></tr>
<tr><td class="fieldname"><a id="a498937b5a72accbb0ef21bb1dcdd55caa84e18ba6561d5a834dc8d794504708db"></a>YH_ALGO_RSA_PKCS1_SHA512&#160;</td><td class="fielddoc"><p>rsa-pkcs1-sha512 </p>
</td></tr>
<tr><td class="fieldname"><a id="a498937b5a72accbb0ef21bb1dcdd55caa24d40fa957c584cf2ef0f5b0053b9f32"></a>YH_ALGO_RSA_PSS_SHA1&#160;</td><td class="fielddoc"><p>rsa-pss-sha1 </p>
</td></tr>
<tr><td class="fieldname"><a id="a498937b5a72accbb0ef21bb1dcdd55caac42381f876f5e7190547cf81021451f5"></a>YH_ALGO_RSA_PSS_SHA256&#160;</td><td class="fielddoc"><p>rsa-pss-sha256 </p>
</td></tr>
<tr><td class="fieldname"><a id="a498937b5a72accbb0ef21bb1dcdd55caa144083d6414cb33e8543d51e7d361d05"></a>YH_ALGO_RSA_PSS_SHA384&#160;</td><td class="fielddoc"><p>rsa-pss-sha384 </p>
</td></tr>
<tr><td class="fieldname"><a id="a498937b5a72accbb0ef21bb1dcdd55caa1d5a50a1a53000cd2b2989c17703e2d1"></a>YH_ALGO_RSA_PSS_SHA512&#160;</td><td class="fielddoc"><p>rsa-pss-sha512 </p>
</td></tr>
<tr><td class="fieldname"><a id="a498937b5a72accbb0ef21bb1dcdd55caaafe94e6a770edb51c6db84f77d98d2c6"></a>YH_ALGO_RSA_2048&#160;</td><td class="fielddoc"><p>rsa2048 </p>
</td></tr>
<tr><td class="fieldname"><a id="a498937b5a72accbb0ef21bb1dcdd55caafd3fbd9ed86caf267ccc77cb24d44426"></a>YH_ALGO_RSA_3072&#160;</td><td class="fielddoc"><p>rsa3072 </p>
</td></tr>
<tr><td class="fieldname"><a id="a498937b5a72accbb0ef21bb1dcdd55caae5963322a0a0f43a1b74faa78e3a7329"></a>YH_ALGO_RSA_4096&#160;</td><td class="fielddoc"><p>rsa4096 </p>
</td></tr>
<tr><td class="fieldname"><a id="a498937b5a72accbb0ef21bb1dcdd55caae4b191baf5c65f9234120080264d129b"></a>YH_ALGO_EC_P256&#160;</td><td class="fielddoc"><p>ecp256 </p>
</td></tr>
<tr><td class="fieldname"><a id="a498937b5a72accbb0ef21bb1dcdd55caa31094c17c66e4c365ca3dad353bc8bda"></a>YH_ALGO_EC_P384&#160;</td><td class="fielddoc"><p>ecp384 </p>
</td></tr>
<tr><td class="fieldname"><a id="a498937b5a72accbb0ef21bb1dcdd55caa05aec903fd67851f968aaa606fe2138a"></a>YH_ALGO_EC_P521&#160;</td><td class="fielddoc"><p>ecp521 </p>
</td></tr>
<tr><td class="fieldname"><a id="a498937b5a72accbb0ef21bb1dcdd55caad423056b13955068935dc8b3ac0e65d1"></a>YH_ALGO_EC_K256&#160;</td><td class="fielddoc"><p>eck256 </p>
</td></tr>
<tr><td class="fieldname"><a id="a498937b5a72accbb0ef21bb1dcdd55caabd995726d45b6dd2388775db4767c80d"></a>YH_ALGO_EC_BP256&#160;</td><td class="fielddoc"><p>ecbp256 </p>
</td></tr>
<tr><td class="fieldname"><a id="a498937b5a72accbb0ef21bb1dcdd55caa228fd3332b55c60438dfea6a1b09af36"></a>YH_ALGO_EC_BP384&#160;</td><td class="fielddoc"><p>ecbp384 </p>
</td></tr>
<tr><td class="fieldname"><a id="a498937b5a72accbb0ef21bb1dcdd55caab9c1be17b7b3f755346ff8c3cca3ed25"></a>YH_ALGO_EC_BP512&#160;</td><td class="fielddoc"><p>ecbp512 </p>
</td></tr>
<tr><td class="fieldname"><a id="a498937b5a72accbb0ef21bb1dcdd55caa942e65c8cd0034eebe9a20c2297c7b06"></a>YH_ALGO_HMAC_SHA1&#160;</td><td class="fielddoc"><p>hmac-sha1 </p>
</td></tr>
<tr><td class="fieldname"><a id="a498937b5a72accbb0ef21bb1dcdd55caab0a0e1eb424b61057f159f1e53311f5c"></a>YH_ALGO_HMAC_SHA256&#160;</td><td class="fielddoc"><p>hmac-sha256 </p>
</td></tr>
<tr><td class="fieldname"><a id="a498937b5a72accbb0ef21bb1dcdd55caa781e7ca62563917d2129bde8ec53401b"></a>YH_ALGO_HMAC_SHA384&#160;</td><td class="fielddoc"><p>hmac-sha384 </p>
</td></tr>
<tr><td class="fieldname"><a id="a498937b5a72accbb0ef21bb1dcdd55caa72d6c7ea77f10e39bbadc8b58d55b9ec"></a>YH_ALGO_HMAC_SHA512&#160;</td><td class="fielddoc"><p>hmac-sha512 </p>
</td></tr>
<tr><td class="fieldname"><a id="a498937b5a72accbb0ef21bb1dcdd55caae9b7b5598c3839a53e4986dc901be244"></a>YH_ALGO_EC_ECDSA_SHA1&#160;</td><td class="fielddoc"><p>ecdsa-sha1 </p>
</td></tr>
<tr><td class="fieldname"><a id="a498937b5a72accbb0ef21bb1dcdd55caa14b36e4ff3b90d44ace0aa2b2c65ef48"></a>YH_ALGO_EC_ECDH&#160;</td><td class="fielddoc"><p>ecdh </p>
</td></tr>
<tr><td class="fieldname"><a id="a498937b5a72accbb0ef21bb1dcdd55caae9e58613e12b0f9f445e620f1dd77e1d"></a>YH_ALGO_RSA_OAEP_SHA1&#160;</td><td class="fielddoc"><p>rsa-oaep-sha1 </p>
</td></tr>
<tr><td class="fieldname"><a id="a498937b5a72accbb0ef21bb1dcdd55caa590665f5e23f996daeba0a2586b2ff33"></a>YH_ALGO_RSA_OAEP_SHA256&#160;</td><td class="fielddoc"><p>rsa-oaep-sha256 </p>
</td></tr>
<tr><td class="fieldname"><a id="a498937b5a72accbb0ef21bb1dcdd55caab2580ffabb9b08affd0f7803fb1536cd"></a>YH_ALGO_RSA_OAEP_SHA384&#160;</td><td class="fielddoc"><p>rsa-oaep-sha384 </p>
</td></tr>
<tr><td class="fieldname"><a id="a498937b5a72accbb0ef21bb1dcdd55caaa4c2625511af2c17ed83da552d3dc5f6"></a>YH_ALGO_RSA_OAEP_SHA512&#160;</td><td class="fielddoc"><p>rsa-oaep-sha512 </p>
</td></tr>
<tr><td class="fieldname"><a id="a498937b5a72accbb0ef21bb1dcdd55caae22b228e457c9bdccb5a93d81730b1b1"></a>YH_ALGO_AES128_CCM_WRAP&#160;</td><td class="fielddoc"><p>aes128-ccm-wrap </p>
</td></tr>
<tr><td class="fieldname"><a id="a498937b5a72accbb0ef21bb1dcdd55caab2dc1e1157cd653f7674df10eb145fc3"></a>YH_ALGO_OPAQUE_DATA&#160;</td><td class="fielddoc"><p>opaque-data </p>
</td></tr>
<tr><td class="fieldname"><a id="a498937b5a72accbb0ef21bb1dcdd55caa590b0ef9be4ed65e87e26c985bb7f350"></a>YH_ALGO_OPAQUE_X509_CERTIFICATE&#160;</td><td class="fielddoc"><p>opaque-x509-certificate </p>
</td></tr>
<tr><td class="fieldname"><a id="a498937b5a72accbb0ef21bb1dcdd55caae1ab21f2df42a56bdc8ff046ed14797a"></a>YH_ALGO_MGF1_SHA1&#160;</td><td class="fielddoc"><p>mgf1-sha1 </p>
</td></tr>
<tr><td class="fieldname"><a id="a498937b5a72accbb0ef21bb1dcdd55caae3f68121c91d613fe450c12fad55eab2"></a>YH_ALGO_MGF1_SHA256&#160;</td><td class="fielddoc"><p>mgf1-sha256 </p>
</td></tr>
<tr><td class="fieldname"><a id="a498937b5a72accbb0ef21bb1dcdd55caa788440387af34a9aa10a3e5561c8ee31"></a>YH_ALGO_MGF1_SHA384&#160;</td><td class="fielddoc"><p>mgf1-sha384 </p>
</td></tr>
<tr><td class="fieldname"><a id="a498937b5a72accbb0ef21bb1dcdd55caa104308e8fac7553b1d875f149ff133b1"></a>YH_ALGO_MGF1_SHA512&#160;</td><td class="fielddoc"><p>mgf1-sha512 </p>
</td></tr>
<tr><td class="fieldname"><a id="a498937b5a72accbb0ef21bb1dcdd55caad75fd14ef18fed62ae13cd3657fce3b2"></a>YH_ALGO_TEMPLATE_SSH&#160;</td><td class="fielddoc"><p>template-ssh </p>
</td></tr>
<tr><td class="fieldname"><a id="a498937b5a72accbb0ef21bb1dcdd55caa62e7ba4126ae16faeafb28972a4e0959"></a>YH_ALGO_AES128_YUBICO_OTP&#160;</td><td class="fielddoc"><p>aes128-yubico-otp </p>
</td></tr>
<tr><td class="fieldname"><a id="a498937b5a72accbb0ef21bb1dcdd55caa461952ba18e7fcd792e480f71c853513"></a>YH_ALGO_AES128_YUBICO_AUTHENTICATION&#160;</td><td class="fielddoc"><p>aes128-yubico-authentication </p>
</td></tr>
<tr><td class="fieldname"><a id="a498937b5a72accbb0ef21bb1dcdd55caa62dd31db747b4b7f81d9e30877a0b720"></a>YH_ALGO_AES192_YUBICO_OTP&#160;</td><td class="fielddoc"><p>aes192-yubico-otp </p>
</td></tr>
<tr><td class="fieldname"><a id="a498937b5a72accbb0ef21bb1dcdd55caad1558532867577d1d77c84f1ae632acd"></a>YH_ALGO_AES256_YUBICO_OTP&#160;</td><td class="fielddoc"><p>aes256-yubico-otp </p>
</td></tr>
<tr><td class="fieldname"><a id="a498937b5a72accbb0ef21bb1dcdd55caab739a1d142dacaf37ba13a73e2d83fab"></a>YH_ALGO_AES192_CCM_WRAP&#160;</td><td class="fielddoc"><p>aes192-ccm-wrap </p>
</td></tr>
<tr><td class="fieldname"><a id="a498937b5a72accbb0ef21bb1dcdd55caa927e2246e5657f946b4da4b71092b022"></a>YH_ALGO_AES256_CCM_WRAP&#160;</td><td class="fielddoc"><p>aes256-ccm-wrap </p>
</td></tr>
<tr><td class="fieldname"><a id="a498937b5a72accbb0ef21bb1dcdd55caa2e5dfe9c79cb0d391d7bf952227268ec"></a>YH_ALGO_EC_ECDSA_SHA256&#160;</td><td class="fielddoc"><p>ecdsa-sha256 </p>
</td></tr>
<tr><td class="fieldname"><a id="a498937b5a72accbb0ef21bb1dcdd55caa657d2b30d884aeeff3c024404132ad69"></a>YH_ALGO_EC_ECDSA_SHA384&#160;</td><td class="fielddoc"><p>ecdsa-sha384 </p>
</td></tr>
<tr><td class="fieldname"><a id="a498937b5a72accbb0ef21bb1dcdd55caa44153987efd3466070143dbab77f2d70"></a>YH_ALGO_EC_ECDSA_SHA512&#160;</td><td class="fielddoc"><p>ecdsa-sha512 </p>
</td></tr>
<tr><td class="fieldname"><a id="a498937b5a72accbb0ef21bb1dcdd55caa68c2c97f16c36f727e41a899d8a7e8bd"></a>YH_ALGO_EC_ED25519&#160;</td><td class="fielddoc"><p>ed25519 </p>
</td></tr>
<tr><td class="fieldname"><a id="a498937b5a72accbb0ef21bb1dcdd55caaedcbc07d82b18ca5c21eb3379a6cc010"></a>YH_ALGO_EC_P224&#160;</td><td class="fielddoc"><p>ecp224 </p>
</td></tr>
</table>

</div>
</div>
<a id="aa5415bafa9c48dfef0e183d8df504b7e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa5415bafa9c48dfef0e183d8df504b7e">&#9670;&nbsp;</a></span>yh_cmd</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="yubihsm_8h.html#aa5415bafa9c48dfef0e183d8df504b7e">yh_cmd</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Command definitions. </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="aa5415bafa9c48dfef0e183d8df504b7eae6b3fe5caff1ded14a3cd9b708ce933b"></a>YHC_ECHO&#160;</td><td class="fielddoc"><p>Echo data back from the device. </p>
</td></tr>
<tr><td class="fieldname"><a id="aa5415bafa9c48dfef0e183d8df504b7ea7a24521b80c5a1221039476dacdcaf27"></a>YHC_CREATE_SESSION&#160;</td><td class="fielddoc"><p>Create a session with the device. </p>
</td></tr>
<tr><td class="fieldname"><a id="aa5415bafa9c48dfef0e183d8df504b7eacb4ef61bb1599fd1a114293a221605a1"></a>YHC_AUTHENTICATE_SESSION&#160;</td><td class="fielddoc"><p>Authenticate the session to the device. </p>
</td></tr>
<tr><td class="fieldname"><a id="aa5415bafa9c48dfef0e183d8df504b7ea99440ca6f76ab150f569f48d2d0bcd25"></a>YHC_SESSION_MESSAGE&#160;</td><td class="fielddoc"><p>Send a command over an established session. </p>
</td></tr>
<tr><td class="fieldname"><a id="aa5415bafa9c48dfef0e183d8df504b7eace06d0b43a2a80581100cf1776a38f0e"></a>YHC_GET_DEVICE_INFO&#160;</td><td class="fielddoc"><p>Get device metadata. </p>
</td></tr>
<tr><td class="fieldname"><a id="aa5415bafa9c48dfef0e183d8df504b7ea5320ce29ed6d254f22377dac1abb89c3"></a>YHC_RESET_DEVICE&#160;</td><td class="fielddoc"><p>Factory reset a device. </p>
</td></tr>
<tr><td class="fieldname"><a id="aa5415bafa9c48dfef0e183d8df504b7eaa146b6b0d6fa832d9cd3ed412e2fb0c0"></a>YHC_CLOSE_SESSION&#160;</td><td class="fielddoc"><p>Close session. </p>
</td></tr>
<tr><td class="fieldname"><a id="aa5415bafa9c48dfef0e183d8df504b7ea2b9aae2f08a49e1305f64c7a5649ed3c"></a>YHC_GET_STORAGE_INFO&#160;</td><td class="fielddoc"><p>Get storage information. </p>
</td></tr>
<tr><td class="fieldname"><a id="aa5415bafa9c48dfef0e183d8df504b7ea08ea37d765609e7663719a12f6f4fe8c"></a>YHC_PUT_OPAQUE&#160;</td><td class="fielddoc"><p>Import an Opaque Object into the device. </p>
</td></tr>
<tr><td class="fieldname"><a id="aa5415bafa9c48dfef0e183d8df504b7ea84c5fd3021700d84b73f734aa1f8f626"></a>YHC_GET_OPAQUE&#160;</td><td class="fielddoc"><p>Get an Opaque Object from device. </p>
</td></tr>
<tr><td class="fieldname"><a id="aa5415bafa9c48dfef0e183d8df504b7eafb7d9a86be4529c63a0eb8bca46c3c8f"></a>YHC_PUT_AUTHENTICATION_KEY&#160;</td><td class="fielddoc"><p>Import an Authentication Key into the device. </p>
</td></tr>
<tr><td class="fieldname"><a id="aa5415bafa9c48dfef0e183d8df504b7eaabc6fa169e75105a6878311899a08176"></a>YHC_PUT_ASYMMETRIC_KEY&#160;</td><td class="fielddoc"><p>Import an Asymmetric Key into the device. </p>
</td></tr>
<tr><td class="fieldname"><a id="aa5415bafa9c48dfef0e183d8df504b7ea3adc1455f48e24dadace769e09ae99ef"></a>YHC_GENERATE_ASYMMETRIC_KEY&#160;</td><td class="fielddoc"><p>Generate an Asymmetric Key in the device. </p>
</td></tr>
<tr><td class="fieldname"><a id="aa5415bafa9c48dfef0e183d8df504b7ea7e18aa1f59c84afedacd7a2c770de599"></a>YHC_SIGN_PKCS1&#160;</td><td class="fielddoc"><p>Sign data using RSA-PKCS#1v1.5. </p>
</td></tr>
<tr><td class="fieldname"><a id="aa5415bafa9c48dfef0e183d8df504b7eabd60dd90a002636168151e1ccf738bea"></a>YHC_LIST_OBJECTS&#160;</td><td class="fielddoc"><p>List objects in the device. </p>
</td></tr>
<tr><td class="fieldname"><a id="aa5415bafa9c48dfef0e183d8df504b7ea59f3cbf98c6bb349d9daceeebf1dfb6c"></a>YHC_DECRYPT_PKCS1&#160;</td><td class="fielddoc"><p>Decrypt data that was encrypted using RSA-PKCS#1v1.5. </p>
</td></tr>
<tr><td class="fieldname"><a id="aa5415bafa9c48dfef0e183d8df504b7eaa7faa69e574e88fd7811924cf68333e1"></a>YHC_EXPORT_WRAPPED&#160;</td><td class="fielddoc"><p>Get an Object under wrap from the device. </p>
</td></tr>
<tr><td class="fieldname"><a id="aa5415bafa9c48dfef0e183d8df504b7ea8cfbbac56dcb89e8c368335425732818"></a>YHC_IMPORT_WRAPPED&#160;</td><td class="fielddoc"><p>Import a wrapped Object into the device. </p>
</td></tr>
<tr><td class="fieldname"><a id="aa5415bafa9c48dfef0e183d8df504b7ea196ea5e674cb57be9c44bca2fab0f648"></a>YHC_PUT_WRAP_KEY&#160;</td><td class="fielddoc"><p>Import a Wrap Key into the device. </p>
</td></tr>
<tr><td class="fieldname"><a id="aa5415bafa9c48dfef0e183d8df504b7ea407b7faa2abc38d9aa7cde15be1a40d6"></a>YHC_GET_LOG_ENTRIES&#160;</td><td class="fielddoc"><p>Get all current audit log entries from the device Log Store. </p>
</td></tr>
<tr><td class="fieldname"><a id="aa5415bafa9c48dfef0e183d8df504b7ead391e68b3b37284e15c419f11bcf54be"></a>YHC_GET_OBJECT_INFO&#160;</td><td class="fielddoc"><p>Get all metadata about an Object. </p>
</td></tr>
<tr><td class="fieldname"><a id="aa5415bafa9c48dfef0e183d8df504b7ea97eacb1db651a5a7b2db7911a2f5631c"></a>YHC_SET_OPTION&#160;</td><td class="fielddoc"><p>Set a device-global options that affect general behavior. </p>
</td></tr>
<tr><td class="fieldname"><a id="aa5415bafa9c48dfef0e183d8df504b7eae350b6b86bec0e5760420288560e91c7"></a>YHC_GET_OPTION&#160;</td><td class="fielddoc"><p>Get a device-global option. </p>
</td></tr>
<tr><td class="fieldname"><a id="aa5415bafa9c48dfef0e183d8df504b7ea5347898552fcefaf090e08d3f0fa16d1"></a>YHC_GET_PSEUDO_RANDOM&#160;</td><td class="fielddoc"><p>Get a fixed number of pseudo-random bytes from the device. </p>
</td></tr>
<tr><td class="fieldname"><a id="aa5415bafa9c48dfef0e183d8df504b7ea4973a64a582232f5428e590d8a74a4ca"></a>YHC_PUT_HMAC_KEY&#160;</td><td class="fielddoc"><p>Import a HMAC key into the device. </p>
</td></tr>
<tr><td class="fieldname"><a id="aa5415bafa9c48dfef0e183d8df504b7eaa746f3db48f68374bf0e1a3dbc743e25"></a>YHC_SIGN_HMAC&#160;</td><td class="fielddoc"><p>Perform an HMAC operation in the device. </p>
</td></tr>
<tr><td class="fieldname"><a id="aa5415bafa9c48dfef0e183d8df504b7eadb02455455d591b5134c7d064b96940a"></a>YHC_GET_PUBLIC_KEY&#160;</td><td class="fielddoc"><p>Get the public key of an Asymmetric Key in the device. </p>
</td></tr>
<tr><td class="fieldname"><a id="aa5415bafa9c48dfef0e183d8df504b7eafe1b7412c2ee2c70d95de3e5b187ce9b"></a>YHC_SIGN_PSS&#160;</td><td class="fielddoc"><p>Sign data using RSA-PSS. </p>
</td></tr>
<tr><td class="fieldname"><a id="aa5415bafa9c48dfef0e183d8df504b7ea3ed85c21f1f5cd1eb658a37686153c32"></a>YHC_SIGN_ECDSA&#160;</td><td class="fielddoc"><p>Sign data using ECDSA. </p>
</td></tr>
<tr><td class="fieldname"><a id="aa5415bafa9c48dfef0e183d8df504b7ea6924a3fe7f15d482eb15155229385e24"></a>YHC_DERIVE_ECDH&#160;</td><td class="fielddoc"><p>Perform an ECDH key exchange operation with a private key in the device. </p>
</td></tr>
<tr><td class="fieldname"><a id="aa5415bafa9c48dfef0e183d8df504b7ea103f15650d237a6d729eb591344beb27"></a>YHC_DELETE_OBJECT&#160;</td><td class="fielddoc"><p>Delete object in the device. </p>
</td></tr>
<tr><td class="fieldname"><a id="aa5415bafa9c48dfef0e183d8df504b7ea672606a4eaa485a944fc9b397dfb49fe"></a>YHC_DECRYPT_OAEP&#160;</td><td class="fielddoc"><p>Decrypt data using RSA-OAEP. </p>
</td></tr>
<tr><td class="fieldname"><a id="aa5415bafa9c48dfef0e183d8df504b7eaa8f4aa4e5858433726b93b4274ccde44"></a>YHC_GENERATE_HMAC_KEY&#160;</td><td class="fielddoc"><p>Generate an HMAC Key in the device. </p>
</td></tr>
<tr><td class="fieldname"><a id="aa5415bafa9c48dfef0e183d8df504b7ea98073b13b11e1b6b8c949fdd55b5beb8"></a>YHC_GENERATE_WRAP_KEY&#160;</td><td class="fielddoc"><p>Generate a Wrap Key in the device. </p>
</td></tr>
<tr><td class="fieldname"><a id="aa5415bafa9c48dfef0e183d8df504b7ea8eae52f5e9117bfa52f0a5fe7d7b70c7"></a>YHC_VERIFY_HMAC&#160;</td><td class="fielddoc"><p>Verify a generated HMAC. </p>
</td></tr>
<tr><td class="fieldname"><a id="aa5415bafa9c48dfef0e183d8df504b7ea40c027d3259d249e93bc5af7cffa2ba8"></a>YHC_SIGN_SSH_CERTIFICATE&#160;</td><td class="fielddoc"><p>Sign SSH certificate request. </p>
</td></tr>
<tr><td class="fieldname"><a id="aa5415bafa9c48dfef0e183d8df504b7ea254f1db08db6611467ac60080b8e1efb"></a>YHC_PUT_TEMPLATE&#160;</td><td class="fielddoc"><p>Import a template into the device. </p>
</td></tr>
<tr><td class="fieldname"><a id="aa5415bafa9c48dfef0e183d8df504b7ea67689e095f98a1675a327645f277febe"></a>YHC_GET_TEMPLATE&#160;</td><td class="fielddoc"><p>Get a template from the device. </p>
</td></tr>
<tr><td class="fieldname"><a id="aa5415bafa9c48dfef0e183d8df504b7ea11337520933c31c92d84ade88832c428"></a>YHC_DECRYPT_OTP&#160;</td><td class="fielddoc"><p>Decrypt a Yubico OTP. </p>
</td></tr>
<tr><td class="fieldname"><a id="aa5415bafa9c48dfef0e183d8df504b7ea9182160a3938ffc93f1a07fbfa77f5e9"></a>YHC_CREATE_OTP_AEAD&#160;</td><td class="fielddoc"><p>Create a Yubico OTP AEAD. </p>
</td></tr>
<tr><td class="fieldname"><a id="aa5415bafa9c48dfef0e183d8df504b7ea8777e821f221c0be394e0fb1f13a411d"></a>YHC_RANDOMIZE_OTP_AEAD&#160;</td><td class="fielddoc"><p>Generate an OTP AEAD from random data. </p>
</td></tr>
<tr><td class="fieldname"><a id="aa5415bafa9c48dfef0e183d8df504b7eaab512a03e51cea5105117f93370d17f0"></a>YHC_REWRAP_OTP_AEAD&#160;</td><td class="fielddoc"><p>Re-encrypt a Yubico OTP AEAD from one OTP AEAD Key to another OTP AEAD Key. </p>
</td></tr>
<tr><td class="fieldname"><a id="aa5415bafa9c48dfef0e183d8df504b7ea8943e0ac51e6518f85a77f1b3509d2af"></a>YHC_SIGN_ATTESTATION_CERTIFICATE&#160;</td><td class="fielddoc"><p>Get attestation of an Asymmetric Key. </p>
</td></tr>
<tr><td class="fieldname"><a id="aa5415bafa9c48dfef0e183d8df504b7ea580f4a45e7fb32de7cea8475d3397500"></a>YHC_PUT_OTP_AEAD_KEY&#160;</td><td class="fielddoc"><p>Import an OTP AEAD Key into the device. </p>
</td></tr>
<tr><td class="fieldname"><a id="aa5415bafa9c48dfef0e183d8df504b7ea58884e12c4e65351037902e59d98d497"></a>YHC_GENERATE_OTP_AEAD_KEY&#160;</td><td class="fielddoc"><p>Generate an OTP AEAD Key in the device. </p>
</td></tr>
<tr><td class="fieldname"><a id="aa5415bafa9c48dfef0e183d8df504b7ead7ee3c3b805a89c9c2708f15b9ec165a"></a>YHC_SET_LOG_INDEX&#160;</td><td class="fielddoc"><p>Set the last extracted audit log entry. </p>
</td></tr>
<tr><td class="fieldname"><a id="aa5415bafa9c48dfef0e183d8df504b7ea852e001ac88c54fddceb9ed4c5a8d386"></a>YHC_WRAP_DATA&#160;</td><td class="fielddoc"><p>Encrypt (wrap) data using a Wrap Key. </p>
</td></tr>
<tr><td class="fieldname"><a id="aa5415bafa9c48dfef0e183d8df504b7ea86a36b37a45067589ed796cc96ab047d"></a>YHC_UNWRAP_DATA&#160;</td><td class="fielddoc"><p>Decrypt (unwrap) data using a Wrap Key. </p>
</td></tr>
<tr><td class="fieldname"><a id="aa5415bafa9c48dfef0e183d8df504b7ea753bb59b9d30189cc0c311d4c9ff4480"></a>YHC_SIGN_EDDSA&#160;</td><td class="fielddoc"><p>Sign data using EdDSA. </p>
</td></tr>
<tr><td class="fieldname"><a id="aa5415bafa9c48dfef0e183d8df504b7eab85f00cab685ade5857fa555fb926a7a"></a>YHC_BLINK_DEVICE&#160;</td><td class="fielddoc"><p>Blink the LED of the device. </p>
</td></tr>
<tr><td class="fieldname"><a id="aa5415bafa9c48dfef0e183d8df504b7ea5a0649ee2fba224fec086884f368faa0"></a>YHC_CHANGE_AUTHENTICATION_KEY&#160;</td><td class="fielddoc"><p>Replace the Authentication Key used to establish the current Session. </p>
</td></tr>
<tr><td class="fieldname"><a id="aa5415bafa9c48dfef0e183d8df504b7ea51cdf2ccd6995498e589e8ea6ce2a1f2"></a>YHC_ERROR&#160;</td><td class="fielddoc"><p>The response byte returned from the device if the command resulted in an error. </p>
</td></tr>
</table>

</div>
</div>
<a id="a59400bce0478b88e048d5e62b2b0b015"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a59400bce0478b88e048d5e62b2b0b015">&#9670;&nbsp;</a></span>yh_connector_option</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="yubihsm_8h.html#a59400bce0478b88e048d5e62b2b0b015">yh_connector_option</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Options for the connector, set with <a class="el" href="yubihsm_8h.html#a9addbfae4cdb70b819986e7769cdd102" title="Set connector options. ">yh_set_connector_option()</a> </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="a59400bce0478b88e048d5e62b2b0b015aef4e49a3018eee6219e6fdee93b32386"></a>YH_CONNECTOR_HTTPS_CA&#160;</td><td class="fielddoc"><p>File with CA certificate to validate the connector with (const char *). </p>
<p>Not implemented on Windows </p>
</td></tr>
<tr><td class="fieldname"><a id="a59400bce0478b88e048d5e62b2b0b015a90c65d2ccea0060d121c9c60b3a8b2df"></a>YH_CONNECTOR_PROXY_SERVER&#160;</td><td class="fielddoc"><p>Proxy server to use for connecting to the connector (const char *). </p>
<p>Not implemented on Windows </p>
</td></tr>
</table>

</div>
</div>
<a id="a2fe39512cb4df34b270a67dbb8e13583"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2fe39512cb4df34b270a67dbb8e13583">&#9670;&nbsp;</a></span>yh_object_type</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="yubihsm_8h.html#a2fe39512cb4df34b270a67dbb8e13583">yh_object_type</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Object types. </p>
<dl class="section see"><dt>See also</dt><dd><a href="https://developers.yubico.com/YubiHSM2/Concepts/Object.html">Objects</a> </dd></dl>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="a2fe39512cb4df34b270a67dbb8e13583a5d37b7418d50b420621e6a6eb2700de4"></a>YH_OPAQUE&#160;</td><td class="fielddoc"><p>Opaque Object is an unchecked kind of Object, normally used to store raw data in the device. </p>
</td></tr>
<tr><td class="fieldname"><a id="a2fe39512cb4df34b270a67dbb8e13583acee44b775b3c5b6157f0732699935074"></a>YH_AUTHENTICATION_KEY&#160;</td><td class="fielddoc"><p>Authentication Key is used to establish Sessions with a device. </p>
</td></tr>
<tr><td class="fieldname"><a id="a2fe39512cb4df34b270a67dbb8e13583ab71424e16384319d6e6a12f9a3d8ceae"></a>YH_ASYMMETRIC_KEY&#160;</td><td class="fielddoc"><p>Asymmetric Key is the private key of an asymmetric key-pair. </p>
</td></tr>
<tr><td class="fieldname"><a id="a2fe39512cb4df34b270a67dbb8e13583a16f0118db1dac3d0732e7d66630e1dba"></a>YH_WRAP_KEY&#160;</td><td class="fielddoc"><p>Wrap Key is a secret key used to wrap and unwrap Objects during the export and import process. </p>
</td></tr>
<tr><td class="fieldname"><a id="a2fe39512cb4df34b270a67dbb8e13583a708d85f80fc33743ac26a7c3e43464a9"></a>YH_HMAC_KEY&#160;</td><td class="fielddoc"><p>HMAC Key is a secret key used when computing and verifying HMAC signatures. </p>
</td></tr>
<tr><td class="fieldname"><a id="a2fe39512cb4df34b270a67dbb8e13583a96244762de5ce4175e60157239e7a097"></a>YH_TEMPLATE&#160;</td><td class="fielddoc"><p>Template is a binary object used for example to validate SSH certificate requests. </p>
</td></tr>
<tr><td class="fieldname"><a id="a2fe39512cb4df34b270a67dbb8e13583a02c5f683fde147de6a9e1043f971f5f0"></a>YH_OTP_AEAD_KEY&#160;</td><td class="fielddoc"><p>OTP AEAD Key is a secret key used to decrypt Yubico OTP values. </p>
</td></tr>
<tr><td class="fieldname"><a id="a2fe39512cb4df34b270a67dbb8e13583af12da448809687dd5d8ca182ecd8dfeb"></a>YH_PUBLIC_KEY&#160;</td><td class="fielddoc"><p>Public Key is the public key of an asymmetric key-pair. </p>
<p>The public key never exists in device and is mostly here for PKCS#11. </p>
</td></tr>
</table>

</div>
</div>
<a id="acc8090ce0ec5029b376803e44b1cb4aa"></a>
<h2 class="memtitle"><span class="permalink"><a href="#acc8090ce0ec5029b376803e44b1cb4aa">&#9670;&nbsp;</a></span>yh_option</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="yubihsm_8h.html#acc8090ce0ec5029b376803e44b1cb4aa">yh_option</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Global options. </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="acc8090ce0ec5029b376803e44b1cb4aaa3431b9d5cadb9b297def332792e51f00"></a>YH_OPTION_FORCE_AUDIT&#160;</td><td class="fielddoc"><p>Enable/Disable Forced Audit mode. </p>
</td></tr>
<tr><td class="fieldname"><a id="acc8090ce0ec5029b376803e44b1cb4aaaf7c1e8ebce866eddcb7bc7ca8fa556da"></a>YH_OPTION_COMMAND_AUDIT&#160;</td><td class="fielddoc"><p>Enable/Disable logging of specific commands. </p>
</td></tr>
</table>

</div>
</div>
<a id="ae4f602d2343d01b1727dfd633169d366"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae4f602d2343d01b1727dfd633169d366">&#9670;&nbsp;</a></span>yh_rc</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Return codes. </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a id="ae4f602d2343d01b1727dfd633169d366a405155512dc2284dc210ed15be1d0815"></a>YHR_SUCCESS&#160;</td><td class="fielddoc"><p>Returned value when function was successful. </p>
</td></tr>
<tr><td class="fieldname"><a id="ae4f602d2343d01b1727dfd633169d366a75ea079345046cdbf5612bf9065d8711"></a>YHR_MEMORY_ERROR&#160;</td><td class="fielddoc"><p>Returned value when unable to allocate memory. </p>
</td></tr>
<tr><td class="fieldname"><a id="ae4f602d2343d01b1727dfd633169d366a1f84ab50c839e0cd6d5b1104a78da569"></a>YHR_INIT_ERROR&#160;</td><td class="fielddoc"><p>Returned value when failing to initialize libyubihsm. </p>
</td></tr>
<tr><td class="fieldname"><a id="ae4f602d2343d01b1727dfd633169d366ae4f6537a9d33914ea06c53b015d92ca8"></a>YHR_CONNECTION_ERROR&#160;</td><td class="fielddoc"><p>Returned value when a connection error was encountered. </p>
</td></tr>
<tr><td class="fieldname"><a id="ae4f602d2343d01b1727dfd633169d366abde0e2f8ca12b6758b246b14a86df11b"></a>YHR_CONNECTOR_NOT_FOUND&#160;</td><td class="fielddoc"><p>Returned value when failing to find a suitable connector. </p>
</td></tr>
<tr><td class="fieldname"><a id="ae4f602d2343d01b1727dfd633169d366a731b3992b45fde61b6760d92de4dbbf5"></a>YHR_INVALID_PARAMETERS&#160;</td><td class="fielddoc"><p>Returned value when an argument to a function is invalid. </p>
</td></tr>
<tr><td class="fieldname"><a id="ae4f602d2343d01b1727dfd633169d366ae0b26dcb22aa228ab08c9e59a8975952"></a>YHR_WRONG_LENGTH&#160;</td><td class="fielddoc"><p>Returned value when there is a mismatch between expected and received length of an argument to a function. </p>
</td></tr>
<tr><td class="fieldname"><a id="ae4f602d2343d01b1727dfd633169d366ad8971a0b9647564b76b3f4e4b662c965"></a>YHR_BUFFER_TOO_SMALL&#160;</td><td class="fielddoc"><p>Returned value when there is not enough space to store data. </p>
</td></tr>
<tr><td class="fieldname"><a id="ae4f602d2343d01b1727dfd633169d366afa1bb1b6e469608a295dcc21a7b23608"></a>YHR_CRYPTOGRAM_MISMATCH&#160;</td><td class="fielddoc"><p>Returned value when failing to verify cryptogram. </p>
</td></tr>
<tr><td class="fieldname"><a id="ae4f602d2343d01b1727dfd633169d366af8d55718c98750591e891a37409c9266"></a>YHR_SESSION_AUTHENTICATION_FAILED&#160;</td><td class="fielddoc"><p>Returned value when failing to authenticate the session. </p>
</td></tr>
<tr><td class="fieldname"><a id="ae4f602d2343d01b1727dfd633169d366adaa2d37fe61d15e17fdea17586ebfbcd"></a>YHR_MAC_MISMATCH&#160;</td><td class="fielddoc"><p>Returned value when failing to verify MAC. </p>
</td></tr>
<tr><td class="fieldname"><a id="ae4f602d2343d01b1727dfd633169d366aea70a2fed59f51d794e77a52a0c27db0"></a>YHR_DEVICE_OK&#160;</td><td class="fielddoc"><p>Returned value when the device returned no error. </p>
</td></tr>
<tr><td class="fieldname"><a id="ae4f602d2343d01b1727dfd633169d366a840bcd92d9959f2075c01437cc49371e"></a>YHR_DEVICE_INVALID_COMMAND&#160;</td><td class="fielddoc"><p>Returned value when the device receives and invalid command. </p>
</td></tr>
<tr><td class="fieldname"><a id="ae4f602d2343d01b1727dfd633169d366ab7388c97719517ba2f7e43d3d16850e1"></a>YHR_DEVICE_INVALID_DATA&#160;</td><td class="fielddoc"><p>Returned value when the device receives a malformed command invalid data. </p>
</td></tr>
<tr><td class="fieldname"><a id="ae4f602d2343d01b1727dfd633169d366a36bb9a78d1e8eda6adcf8fb3eff2bf9d"></a>YHR_DEVICE_INVALID_SESSION&#160;</td><td class="fielddoc"><p>Returned value when the device session is invalid. </p>
</td></tr>
<tr><td class="fieldname"><a id="ae4f602d2343d01b1727dfd633169d366a9fdf081102d4876da3b7bc9986cdbef8"></a>YHR_DEVICE_AUTHENTICATION_FAILED&#160;</td><td class="fielddoc"><p>Return value when the device fails to encrypt or verify the message. </p>
</td></tr>
<tr><td class="fieldname"><a id="ae4f602d2343d01b1727dfd633169d366a8d74af61b564f459e4992436499f837c"></a>YHR_DEVICE_SESSIONS_FULL&#160;</td><td class="fielddoc"><p>Return value when no more sessions can be opened on the device. </p>
</td></tr>
<tr><td class="fieldname"><a id="ae4f602d2343d01b1727dfd633169d366a9884874ed5a0938ac9ddeec502585fc1"></a>YHR_DEVICE_SESSION_FAILED&#160;</td><td class="fielddoc"><p>Return value when failing to create a device session. </p>
</td></tr>
<tr><td class="fieldname"><a id="ae4f602d2343d01b1727dfd633169d366ac2fc63d180fd4b31e93695a75bd89e72"></a>YHR_DEVICE_STORAGE_FAILED&#160;</td><td class="fielddoc"><p>Return value when encountering a storage failure on the device. </p>
</td></tr>
<tr><td class="fieldname"><a id="ae4f602d2343d01b1727dfd633169d366ae22388bb4f7dd6a83e36b5789008cd39"></a>YHR_DEVICE_WRONG_LENGTH&#160;</td><td class="fielddoc"><p>Return value when there is a mismatch between expected and received length of an argument to a function on the device. </p>
</td></tr>
<tr><td class="fieldname"><a id="ae4f602d2343d01b1727dfd633169d366a2d814fba9f3dbdcb892f92adee1d945c"></a>YHR_DEVICE_INSUFFICIENT_PERMISSIONS&#160;</td><td class="fielddoc"><p>Return value when the permissions to perform the operation are wrong. </p>
</td></tr>
<tr><td class="fieldname"><a id="ae4f602d2343d01b1727dfd633169d366aa71078f32dee465f1156c337c7e4610e"></a>YHR_DEVICE_LOG_FULL&#160;</td><td class="fielddoc"><p>Return value when the log buffer is full and forced audit is set. </p>
</td></tr>
<tr><td class="fieldname"><a id="ae4f602d2343d01b1727dfd633169d366a9bc4026d75a26dcaa51ba3310d6b8393"></a>YHR_DEVICE_OBJECT_NOT_FOUND&#160;</td><td class="fielddoc"><p>Return value when the object not found on the device. </p>
</td></tr>
<tr><td class="fieldname"><a id="ae4f602d2343d01b1727dfd633169d366af5f013b1143c6e430778faaca1592e50"></a>YHR_DEVICE_INVALID_ID&#160;</td><td class="fielddoc"><p>Return value when an invalid Object ID is used. </p>
</td></tr>
<tr><td class="fieldname"><a id="ae4f602d2343d01b1727dfd633169d366aad5480151e2d8e8caadb6c85d0567265"></a>YHR_DEVICE_INVALID_OTP&#160;</td><td class="fielddoc"><p>Return value when an invalid OTP is submitted. </p>
</td></tr>
<tr><td class="fieldname"><a id="ae4f602d2343d01b1727dfd633169d366ab45152628f7dec50379da96a042b9e71"></a>YHR_DEVICE_DEMO_MODE&#160;</td><td class="fielddoc"><p>Return value when the device is in demo mode and has to be power cycled. </p>
</td></tr>
<tr><td class="fieldname"><a id="ae4f602d2343d01b1727dfd633169d366a45c1eb30625a88593aadff037d48454b"></a>YHR_DEVICE_COMMAND_UNEXECUTED&#160;</td><td class="fielddoc"><p>Return value when the command execution has not terminated. </p>
</td></tr>
<tr><td class="fieldname"><a id="ae4f602d2343d01b1727dfd633169d366a39fbc5bce29b178582419ae9d31ad252"></a>YHR_GENERIC_ERROR&#160;</td><td class="fielddoc"><p>Return value when encountering an unknown error. </p>
</td></tr>
<tr><td class="fieldname"><a id="ae4f602d2343d01b1727dfd633169d366ad28a1a4679841fd8a7388c8b7981d5db"></a>YHR_DEVICE_OBJECT_EXISTS&#160;</td><td class="fielddoc"><p>Return value when trying to add an object with an ID that already exists. </p>
</td></tr>
<tr><td class="fieldname"><a id="ae4f602d2343d01b1727dfd633169d366ad9339b4f96ca48d9c987ce1e05596fe9"></a>YHR_CONNECTOR_ERROR&#160;</td><td class="fielddoc"><p>Return value when connector operation failed. </p>
</td></tr>
<tr><td class="fieldname"><a id="ae4f602d2343d01b1727dfd633169d366ae6b1a467cd82c64277c85b298ef1934b"></a>YHR_DEVICE_SSH_CA_CONSTRAINT_VIOLATION&#160;</td><td class="fielddoc"><p>Return value when encountering SSH CA constraint violation. </p>
</td></tr>
</table>

</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a id="a2a0d369611aa795c62645467062a9acb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2a0d369611aa795c62645467062a9acb">&#9670;&nbsp;</a></span>yh_algo_to_string()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a> yh_algo_to_string </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55ca">yh_algorithm</a>&#160;</td>
          <td class="paramname"><em>algo</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char const **&#160;</td>
          <td class="paramname"><em>result</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Convert an algorithm to its string representation. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">algo</td><td>Algorithm to convert. See <a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55ca" title="Algorithms. ">yh_algorithm</a> </td></tr>
    <tr><td class="paramname">result</td><td>The algorithm as a String. "Unknown" if the algorithm is not supported by YubiHSM 2.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a405155512dc2284dc210ed15be1d0815" title="Returned value when function was successful. ">YHR_SUCCESS</a> if successful. <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a731b3992b45fde61b6760d92de4dbbf5" title="Returned value when an argument to a function is invalid. ">YHR_INVALID_PARAMETERS</a> if <code>result</code> is NULL.</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a href="https://developers.yubico.com/YubiHSM2/Concepts/Algorithms.html">Algorithms</a> </dd></dl>

</div>
</div>
<a id="a77870209747d5ccd90f9da3aae2bdfa8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a77870209747d5ccd90f9da3aae2bdfa8">&#9670;&nbsp;</a></span>yh_authenticate_session()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a> yh_authenticate_session </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="yubihsm_8h.html#aa3420d8ccc1fb0b0dee1af5a53cc79de">yh_session</a> *&#160;</td>
          <td class="paramname"><em>session</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Authenticate session. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">session</td><td>Session to authenticate</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a405155512dc2284dc210ed15be1d0815" title="Returned value when function was successful. ">YHR_SUCCESS</a> if successful. <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a731b3992b45fde61b6760d92de4dbbf5" title="Returned value when an argument to a function is invalid. ">YHR_INVALID_PARAMETERS</a> if the session is NULL. <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366af8d55718c98750591e891a37409c9266" title="Returned value when failing to authenticate the session. ">YHR_SESSION_AUTHENTICATION_FAILED</a> if the session fails to authenticate. See <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366" title="Return codes. ">yh_rc</a> for other possible errors</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a href="https://developers.yubico.com/YubiHSM2/Concepts/Session.html">Session</a> </dd></dl>

</div>
</div>
<a id="a296b43eadb1151017ba8e9578b351c5e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a296b43eadb1151017ba8e9578b351c5e">&#9670;&nbsp;</a></span>yh_begin_create_session_ext()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a> yh_begin_create_session_ext </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="yubihsm_8h.html#a114f98fee4b67eadd9b89b675632c710">yh_connector</a> *&#160;</td>
          <td class="paramname"><em>connector</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t&#160;</td>
          <td class="paramname"><em>authkey_id</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t **&#160;</td>
          <td class="paramname"><em>context</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t *&#160;</td>
          <td class="paramname"><em>card_cryptogram</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>card_cryptogram_len</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="yubihsm_8h.html#aa3420d8ccc1fb0b0dee1af5a53cc79de">yh_session</a> **&#160;</td>
          <td class="paramname"><em>session</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Begin creating an external session. </p>
<p>The session's encryption key and MAC key are not stored in the device.</p>
<p>This function must be followed by <a class="el" href="yubihsm_8h.html#afbcb5c761339fbcf444be8f338b4614f" title="Finish creating external session. ">yh_finish_create_session_ext()</a> to set the session keys.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">connector</td><td>Connector to the device </td></tr>
    <tr><td class="paramname">authkey_id</td><td>Object ID of the Authentication Key used to authenticate the session </td></tr>
    <tr><td class="paramname">context</td><td>pointer to where context data is saved </td></tr>
    <tr><td class="paramname">card_cryptogram</td><td>Card cryptogram </td></tr>
    <tr><td class="paramname">card_cryptogram_len</td><td>Length of card cryptogram </td></tr>
    <tr><td class="paramname">session</td><td>created session</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a405155512dc2284dc210ed15be1d0815" title="Returned value when function was successful. ">YHR_SUCCESS</a> if successful. <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a731b3992b45fde61b6760d92de4dbbf5" title="Returned value when an argument to a function is invalid. ">YHR_INVALID_PARAMETERS</a> if input parameters are NULL. <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a75ea079345046cdbf5612bf9065d8711" title="Returned value when unable to allocate memory. ">YHR_MEMORY_ERROR</a> if failed to allocate memory for the session. See <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366" title="Return codes. ">yh_rc</a> for other possible errors</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a href="https://developers.yubico.com/YubiHSM2/Concepts/Session.html">Session</a> </dd></dl>

</div>
</div>
<a id="ac46bac75dfd0a4358a4e6b432a50e48a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac46bac75dfd0a4358a4e6b432a50e48a">&#9670;&nbsp;</a></span>yh_capabilities_to_strings()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a> yh_capabilities_to_strings </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structyh__capabilities.html">yh_capabilities</a> *&#160;</td>
          <td class="paramname"><em>num</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>result</em>[], </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t *&#160;</td>
          <td class="paramname"><em>n_result</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Convert an array of <a class="el" href="structyh__capabilities.html" title="Capabilities representation. ">yh_capabilities</a> into strings separated by ','. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">num</td><td>Array of <a class="el" href="structyh__capabilities.html" title="Capabilities representation. ">yh_capabilities</a> </td></tr>
    <tr><td class="paramname">result</td><td>Array of the capabilies as strings </td></tr>
    <tr><td class="paramname">n_result</td><td>Number of elements in result</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a405155512dc2284dc210ed15be1d0815" title="Returned value when function was successful. ">YHR_SUCCESS</a> if successful. <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a731b3992b45fde61b6760d92de4dbbf5" title="Returned value when an argument to a function is invalid. ">YHR_INVALID_PARAMETERS</a> if input parameters are NULL. <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366ad8971a0b9647564b76b3f4e4b662c965" title="Returned value when there is not enough space to store data. ">YHR_BUFFER_TOO_SMALL</a> if <code>n_result</code> is too small</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a href="https://developers.yubico.com/YubiHSM2/Concepts/Capability.html">Capability</a> </dd></dl>

</div>
</div>
<a id="aba384949362ccaf19cbeae3bb046489c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aba384949362ccaf19cbeae3bb046489c">&#9670;&nbsp;</a></span>yh_check_capability()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool yh_check_capability </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structyh__capabilities.html">yh_capabilities</a> *&#160;</td>
          <td class="paramname"><em>capabilities</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>capability</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Check if a capability is set. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">capabilities</td><td>Array of <a class="el" href="structyh__capabilities.html" title="Capabilities representation. ">yh_capabilities</a> </td></tr>
    <tr><td class="paramname">capability</td><td>Capability to check as a string.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>True if the <code>capability</code> is in <code>capabilities</code>. False otherwise</dd></dl>
<dl class="section user"><dt>Code sample</dt><dd><pre class="fragment">char *capabilities_str = "sign-pkcs,decrypt-pkcs,set-option";
yh_capabilities capabilities = {{0}};
yh_string_to_capabilities(capabilities_str, &amp;capabilities);
//yh_check_capability(&amp;capabilities, "something") =&gt; false
//yh_check_capability(&amp;capabilities, "sign-pss") =&gt; false
//yh_check_capability(&amp;capabilities, "decrypt-pkcs") =&gt; true
</pre></dd></dl>
<dl class="section see"><dt>See also</dt><dd><a href="https://developers.yubico.com/YubiHSM2/Concepts/Capability.html">Capability</a> </dd></dl>

</div>
</div>
<a id="aa19be6ac70a2a5d1cef8d7e6902fe05f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa19be6ac70a2a5d1cef8d7e6902fe05f">&#9670;&nbsp;</a></span>yh_connect()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a> yh_connect </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="yubihsm_8h.html#a114f98fee4b67eadd9b89b675632c710">yh_connector</a> *&#160;</td>
          <td class="paramname"><em>connector</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>timeout</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Connect to the device through the specified connector. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">connector</td><td>Connector to the device </td></tr>
    <tr><td class="paramname">timeout</td><td>Connection timeout in seconds</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a405155512dc2284dc210ed15be1d0815" title="Returned value when function was successful. ">YHR_SUCCESS</a> if successful. <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a731b3992b45fde61b6760d92de4dbbf5" title="Returned value when an argument to a function is invalid. ">YHR_INVALID_PARAMETERS</a> if the connector does not exist. See <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366" title="Return codes. ">yh_rc</a> for other possible errors </dd></dl>

</div>
</div>
<a id="a163506939cedbc1e849bdcfb8b5fe1de"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a163506939cedbc1e849bdcfb8b5fe1de">&#9670;&nbsp;</a></span>yh_connector_has_device()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool yh_connector_has_device </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="yubihsm_8h.html#a114f98fee4b67eadd9b89b675632c710">yh_connector</a> *&#160;</td>
          <td class="paramname"><em>connector</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Check if the connector has a device connected. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">connector</td><td>Connector currently in use</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>True if the connector is not NULL and there is a device connected to it. False otherwise </dd></dl>

</div>
</div>
<a id="ac1534725e97dbf81b37652fe1bffb97a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac1534725e97dbf81b37652fe1bffb97a">&#9670;&nbsp;</a></span>yh_create_session()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a> yh_create_session </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="yubihsm_8h.html#a114f98fee4b67eadd9b89b675632c710">yh_connector</a> *&#160;</td>
          <td class="paramname"><em>connector</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t&#160;</td>
          <td class="paramname"><em>authkey_id</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const uint8_t *&#160;</td>
          <td class="paramname"><em>key_enc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>key_enc_len</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const uint8_t *&#160;</td>
          <td class="paramname"><em>key_mac</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>key_mac_len</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>recreate_session</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="yubihsm_8h.html#aa3420d8ccc1fb0b0dee1af5a53cc79de">yh_session</a> **&#160;</td>
          <td class="paramname"><em>session</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Create a session that uses the specified encryption key and MAC key to derive session-specific keys. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">connector</td><td>Connector to the device </td></tr>
    <tr><td class="paramname">authkey_id</td><td>Object ID of the Authentication Key used to authenticate the session </td></tr>
    <tr><td class="paramname">key_enc</td><td>Encryption key used to derive the session encryption key </td></tr>
    <tr><td class="paramname">key_enc_len</td><td>Length of the encryption key. </td></tr>
    <tr><td class="paramname">key_mac</td><td>MAC key used to derive the session MAC key </td></tr>
    <tr><td class="paramname">key_mac_len</td><td>Length of the MAC key. </td></tr>
    <tr><td class="paramname">recreate_session</td><td>If true, the session will be recreated if expired. This caches the password in memory </td></tr>
    <tr><td class="paramname">session</td><td>created session</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a405155512dc2284dc210ed15be1d0815" title="Returned value when function was successful. ">YHR_SUCCESS</a> if successful. <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a731b3992b45fde61b6760d92de4dbbf5" title="Returned value when an argument to a function is invalid. ">YHR_INVALID_PARAMETERS</a> if input parameters are NULL or incorrect. See <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366" title="Return codes. ">yh_rc</a> for other possible errors</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a href="https://developers.yubico.com/YubiHSM2/Concepts/Session.html">Session</a>, <a href="https://developers.yubico.com/YubiHSM2/Concepts/Object.html">Authentication Key</a> </dd></dl>

</div>
</div>
<a id="a4e5534e6c597a7d32040ea1cc7254c93"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4e5534e6c597a7d32040ea1cc7254c93">&#9670;&nbsp;</a></span>yh_create_session_derived()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a> yh_create_session_derived </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="yubihsm_8h.html#a114f98fee4b67eadd9b89b675632c710">yh_connector</a> *&#160;</td>
          <td class="paramname"><em>connector</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t&#160;</td>
          <td class="paramname"><em>authkey_id</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const uint8_t *&#160;</td>
          <td class="paramname"><em>password</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>password_len</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>recreate_session</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="yubihsm_8h.html#aa3420d8ccc1fb0b0dee1af5a53cc79de">yh_session</a> **&#160;</td>
          <td class="paramname"><em>session</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Create a session that uses an encryption key and a MAC key derived from a password. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">connector</td><td>Connector to the device </td></tr>
    <tr><td class="paramname">authkey_id</td><td>Object ID of the Authentication Key used to authenticate the session </td></tr>
    <tr><td class="paramname">password</td><td>Password used to derive the session encryption key and MAC key </td></tr>
    <tr><td class="paramname">password_len</td><td>Length of the password in bytes </td></tr>
    <tr><td class="paramname">recreate_session</td><td>If true, the session will be recreated if expired. This caches the password in memory </td></tr>
    <tr><td class="paramname">session</td><td>The created session</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a405155512dc2284dc210ed15be1d0815" title="Returned value when function was successful. ">YHR_SUCCESS</a> if successful. <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a731b3992b45fde61b6760d92de4dbbf5" title="Returned value when an argument to a function is invalid. ">YHR_INVALID_PARAMETERS</a> if the connector, the password or the session are NULL. <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a39fbc5bce29b178582419ae9d31ad252" title="Return value when encountering an unknown error. ">YHR_GENERIC_ERROR</a> if failed to derive the session encryption key and/or the MAC key or if PRNG related errors occur. <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a75ea079345046cdbf5612bf9065d8711" title="Returned value when unable to allocate memory. ">YHR_MEMORY_ERROR</a> if failed to allocate memory for the session. See <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366" title="Return codes. ">yh_rc</a> for other possible errors</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a href="https://developers.yubico.com/YubiHSM2/Concepts/Session.html">Session</a> </dd></dl>

</div>
</div>
<a id="a1a35f8ae5a739848408633a514e41b2d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1a35f8ae5a739848408633a514e41b2d">&#9670;&nbsp;</a></span>yh_destroy_session()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a> yh_destroy_session </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="yubihsm_8h.html#aa3420d8ccc1fb0b0dee1af5a53cc79de">yh_session</a> **&#160;</td>
          <td class="paramname"><em>session</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Free data associated with the session. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">session</td><td>Pointer to the session to destroy</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a405155512dc2284dc210ed15be1d0815" title="Returned value when function was successful. ">YHR_SUCCESS</a> if successful. <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a731b3992b45fde61b6760d92de4dbbf5" title="Returned value when an argument to a function is invalid. ">YHR_INVALID_PARAMETERS</a> if the session is NULL.</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a href="https://developers.yubico.com/YubiHSM2/Concepts/Session.html">Session</a> </dd></dl>

</div>
</div>
<a id="ab12d5a42d2219741bd3630b99ed1c7d2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab12d5a42d2219741bd3630b99ed1c7d2">&#9670;&nbsp;</a></span>yh_disconnect()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a> yh_disconnect </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="yubihsm_8h.html#a114f98fee4b67eadd9b89b675632c710">yh_connector</a> *&#160;</td>
          <td class="paramname"><em>connector</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Disconnect from a connector. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">connector</td><td>Connector from which to disconnect</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a405155512dc2284dc210ed15be1d0815" title="Returned value when function was successful. ">YHR_SUCCESS</a> if successful. <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a731b3992b45fde61b6760d92de4dbbf5" title="Returned value when an argument to a function is invalid. ">YHR_INVALID_PARAMETERS</a> if the connector is NULL </dd></dl>

</div>
</div>
<a id="a0100df295f7ecf0d0cc90052aac20586"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0100df295f7ecf0d0cc90052aac20586">&#9670;&nbsp;</a></span>yh_domains_to_string()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a> yh_domains_to_string </td>
          <td>(</td>
          <td class="paramtype">uint16_t&#160;</td>
          <td class="paramname"><em>domains</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>string</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>max_len</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Convert domains parameter to its String representation. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">domains</td><td>Encoded domains </td></tr>
    <tr><td class="paramname">string</td><td>Domains as a string </td></tr>
    <tr><td class="paramname">max_len</td><td>Maximum length of the string</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a405155512dc2284dc210ed15be1d0815" title="Returned value when function was successful. ">YHR_SUCCESS</a> if successful. <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366ad8971a0b9647564b76b3f4e4b662c965" title="Returned value when there is not enough space to store data. ">YHR_BUFFER_TOO_SMALL</a> if <code>max_len</code> is too small</dd></dl>
<dl class="section user"><dt>Examples</dt><dd></dd></dl>
<ul>
<li>1 =&gt; "1"</li>
<li>0x8001 =&gt; "1:16"</li>
<li>0, ""</li>
<li>0xffff =&gt; "1:2:3:4:5:6:7:8:9:10:11:12:13:14:15:16"</li>
</ul>
<dl class="section see"><dt>See also</dt><dd><a href="https://developers.yubico.com/YubiHSM2/Concepts/Domain.html">Domains</a> </dd></dl>

</div>
</div>
<a id="a36e3d9a07c6689e14a9339ca1ebb7259"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a36e3d9a07c6689e14a9339ca1ebb7259">&#9670;&nbsp;</a></span>yh_exit()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a> yh_exit </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Global library clean up. </p>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a405155512dc2284dc210ed15be1d0815" title="Returned value when function was successful. ">YHR_SUCCESS</a> </dd></dl>

</div>
</div>
<a id="a900031f15115ee22e885d2de7ec80a4a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a900031f15115ee22e885d2de7ec80a4a">&#9670;&nbsp;</a></span>yh_filter_capabilities()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a> yh_filter_capabilities </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structyh__capabilities.html">yh_capabilities</a> *&#160;</td>
          <td class="paramname"><em>capabilities</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structyh__capabilities.html">yh_capabilities</a> *&#160;</td>
          <td class="paramname"><em>filter</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structyh__capabilities.html">yh_capabilities</a> *&#160;</td>
          <td class="paramname"><em>result</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Filter one set of capabilities with another. </p>
<p>The resulting set of capabilities contains only the capabilities that exist in both sets of input capabilities</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">capabilities</td><td>Array of <a class="el" href="structyh__capabilities.html" title="Capabilities representation. ">yh_capabilities</a> </td></tr>
    <tr><td class="paramname">filter</td><td>Array of <a class="el" href="structyh__capabilities.html" title="Capabilities representation. ">yh_capabilities</a> </td></tr>
    <tr><td class="paramname">result</td><td>Resulting array of <a class="el" href="structyh__capabilities.html" title="Capabilities representation. ">yh_capabilities</a></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a405155512dc2284dc210ed15be1d0815" title="Returned value when function was successful. ">YHR_SUCCESS</a> if successful. <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a731b3992b45fde61b6760d92de4dbbf5" title="Returned value when an argument to a function is invalid. ">YHR_INVALID_PARAMETERS</a> if input parameters are NULL.</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a href="https://developers.yubico.com/YubiHSM2/Concepts/Capability.html">Capability</a> </dd></dl>

</div>
</div>
<a id="afbcb5c761339fbcf444be8f338b4614f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afbcb5c761339fbcf444be8f338b4614f">&#9670;&nbsp;</a></span>yh_finish_create_session_ext()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a> yh_finish_create_session_ext </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="yubihsm_8h.html#a114f98fee4b67eadd9b89b675632c710">yh_connector</a> *&#160;</td>
          <td class="paramname"><em>connector</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="yubihsm_8h.html#aa3420d8ccc1fb0b0dee1af5a53cc79de">yh_session</a> *&#160;</td>
          <td class="paramname"><em>session</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const uint8_t *&#160;</td>
          <td class="paramname"><em>key_senc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>key_senc_len</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const uint8_t *&#160;</td>
          <td class="paramname"><em>key_smac</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>key_smac_len</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const uint8_t *&#160;</td>
          <td class="paramname"><em>key_srmac</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>key_srmac_len</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t *&#160;</td>
          <td class="paramname"><em>card_cryptogram</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>card_cryptogram_len</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Finish creating external session. </p>
<p>The session's encryption key and MAC key are not stored in the device.</p>
<p>This function must be called after <a class="el" href="yubihsm_8h.html#a296b43eadb1151017ba8e9578b351c5e" title="Begin creating an external session. ">yh_begin_create_session_ext()</a>.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">connector</td><td>Connector to the device </td></tr>
    <tr><td class="paramname">session</td><td>The session created with <a class="el" href="yubihsm_8h.html#a296b43eadb1151017ba8e9578b351c5e" title="Begin creating an external session. ">yh_begin_create_session_ext()</a> </td></tr>
    <tr><td class="paramname">key_senc</td><td>Session encryption key used to encrypt the messages exchanged with the device </td></tr>
    <tr><td class="paramname">key_senc_len</td><td>Lenght of the encryption key. Must be <a class="el" href="yubihsm_8h.html#ac2737b2a34c26d0258d25e34993df391" title="Length of authentication keys. ">YH_KEY_LEN</a> </td></tr>
    <tr><td class="paramname">key_smac</td><td>Session MAC key used for creating the authentication tag for each message </td></tr>
    <tr><td class="paramname">key_smac_len</td><td>Length of the MAC key. Must be <a class="el" href="yubihsm_8h.html#ac2737b2a34c26d0258d25e34993df391" title="Length of authentication keys. ">YH_KEY_LEN</a> </td></tr>
    <tr><td class="paramname">key_srmac</td><td>Session return MAC key used for creating the authentication tag for each response message </td></tr>
    <tr><td class="paramname">key_srmac_len</td><td>Length of the return MAC key. Must be <a class="el" href="yubihsm_8h.html#ac2737b2a34c26d0258d25e34993df391" title="Length of authentication keys. ">YH_KEY_LEN</a> </td></tr>
    <tr><td class="paramname">card_cryptogram</td><td>Card cryptogram </td></tr>
    <tr><td class="paramname">card_cryptogram_len</td><td>Length of card cryptogram</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a405155512dc2284dc210ed15be1d0815" title="Returned value when function was successful. ">YHR_SUCCESS</a> if successful. <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a731b3992b45fde61b6760d92de4dbbf5" title="Returned value when an argument to a function is invalid. ">YHR_INVALID_PARAMETERS</a> if input parameters are NULL or any of the key lengths are not <a class="el" href="yubihsm_8h.html#ac2737b2a34c26d0258d25e34993df391" title="Length of authentication keys. ">YH_KEY_LEN</a>. See <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366" title="Return codes. ">yh_rc</a> for other possible errors</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a href="https://developers.yubico.com/YubiHSM2/Concepts/Session.html">Session</a> </dd></dl>

</div>
</div>
<a id="acb5d5e9a2718b9427269f7d267ca25b9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#acb5d5e9a2718b9427269f7d267ca25b9">&#9670;&nbsp;</a></span>yh_get_connector_address()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a> yh_get_connector_address </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="yubihsm_8h.html#a114f98fee4b67eadd9b89b675632c710">yh_connector</a> *&#160;</td>
          <td class="paramname"><em>connector</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char **const&#160;</td>
          <td class="paramname"><em>address</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get connector address. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">connector</td><td>Connector currently in use </td></tr>
    <tr><td class="paramname">address</td><td>Pointer to the connector address as string</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a405155512dc2284dc210ed15be1d0815" title="Returned value when function was successful. ">YHR_SUCCESS</a> if successful. <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a731b3992b45fde61b6760d92de4dbbf5" title="Returned value when an argument to a function is invalid. ">YHR_INVALID_PARAMETERS</a> if input parameters are NULL. </dd></dl>

</div>
</div>
<a id="a2b9f4070a103724b241e0a2b6a56d1ba"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2b9f4070a103724b241e0a2b6a56d1ba">&#9670;&nbsp;</a></span>yh_get_connector_version()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a> yh_get_connector_version </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="yubihsm_8h.html#a114f98fee4b67eadd9b89b675632c710">yh_connector</a> *&#160;</td>
          <td class="paramname"><em>connector</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t *&#160;</td>
          <td class="paramname"><em>major</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t *&#160;</td>
          <td class="paramname"><em>minor</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t *&#160;</td>
          <td class="paramname"><em>patch</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get the connector version. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">connector</td><td>Connector currently in use </td></tr>
    <tr><td class="paramname">major</td><td>Connector major version </td></tr>
    <tr><td class="paramname">minor</td><td>Connector minor version </td></tr>
    <tr><td class="paramname">patch</td><td>Connector patch version</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a405155512dc2284dc210ed15be1d0815" title="Returned value when function was successful. ">YHR_SUCCESS</a> if successful. <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a731b3992b45fde61b6760d92de4dbbf5" title="Returned value when an argument to a function is invalid. ">YHR_INVALID_PARAMETERS</a> if input parameters are NULL. </dd></dl>

</div>
</div>
<a id="a375000f12ac554eb8cbaa0e6b75c3a08"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a375000f12ac554eb8cbaa0e6b75c3a08">&#9670;&nbsp;</a></span>yh_get_key_bitlength()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a> yh_get_key_bitlength </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55ca">yh_algorithm</a>&#160;</td>
          <td class="paramname"><em>algorithm</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t *&#160;</td>
          <td class="paramname"><em>result</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get the expected key length of a key generated by the given algorithm. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">algorithm</td><td>Algorithm to check. See <a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55ca" title="Algorithms. ">yh_algorithm</a> </td></tr>
    <tr><td class="paramname">result</td><td>Expected bitlength of a key generated by the algorithm</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a405155512dc2284dc210ed15be1d0815" title="Returned value when function was successful. ">YHR_SUCCESS</a> if successful. <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a731b3992b45fde61b6760d92de4dbbf5" title="Returned value when an argument to a function is invalid. ">YHR_INVALID_PARAMETERS</a> if <code>result</code> is NULL or if the algorithm is no supported by YubiHSM 2. For a list of supported algorithms, see <a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55ca" title="Algorithms. ">yh_algorithm</a> </dd></dl>

</div>
</div>
<a id="aeabf472faf1ba8d963b39866e04df6b0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aeabf472faf1ba8d963b39866e04df6b0">&#9670;&nbsp;</a></span>yh_get_session_id()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a> yh_get_session_id </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="yubihsm_8h.html#aa3420d8ccc1fb0b0dee1af5a53cc79de">yh_session</a> *&#160;</td>
          <td class="paramname"><em>session</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t *&#160;</td>
          <td class="paramname"><em>sid</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get the session ID. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">session</td><td>Authenticated session to use </td></tr>
    <tr><td class="paramname">sid</td><td>Session ID</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a405155512dc2284dc210ed15be1d0815" title="Returned value when function was successful. ">YHR_SUCCESS</a> if successful. <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a731b3992b45fde61b6760d92de4dbbf5" title="Returned value when an argument to a function is invalid. ">YHR_INVALID_PARAMETERS</a> if input parameters are NULL. </dd></dl>

</div>
</div>
<a id="a17d49ccb12b100e98d8b99585a705444"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a17d49ccb12b100e98d8b99585a705444">&#9670;&nbsp;</a></span>yh_get_verbosity()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a> yh_get_verbosity </td>
          <td>(</td>
          <td class="paramtype">uint8_t *&#160;</td>
          <td class="paramname"><em>verbosity</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get verbosity level when executing commands. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">verbosity</td><td>The verbosity level</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a405155512dc2284dc210ed15be1d0815" title="Returned value when function was successful. ">YHR_SUCCESS</a> if seccessful. <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a731b3992b45fde61b6760d92de4dbbf5" title="Returned value when an argument to a function is invalid. ">YHR_INVALID_PARAMETERS</a> if verbosity is NULL</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="yubihsm_8h.html#aa11030bbf6092d8934236958e9478084" title="Debug level quiet. No messages printed out. ">YH_VERB_QUIET</a>, <a class="el" href="yubihsm_8h.html#af507fefd9d19bfd531277a6c6cb56452" title="Debug level intermediate. Intermediate results printed out. ">YH_VERB_INTERMEDIATE</a>, <a class="el" href="yubihsm_8h.html#a8881b983de3922f9abb5d1fcc99216e2" title="Debug level crypto. Crypto results printed out. ">YH_VERB_CRYPTO</a>, <a class="el" href="yubihsm_8h.html#a4ead07ea7b1232808085d4bdbc7eb5b9" title="Debug level raw. Raw messages printed out. ">YH_VERB_RAW</a>, <a class="el" href="yubihsm_8h.html#a2ac0b183de01f2dc9f64372e6c66bba4" title="Debug level info. General information messages printed out. ">YH_VERB_INFO</a>, <a class="el" href="yubihsm_8h.html#a978bb82a3974b6778aadb56fa450e8ca" title="Debug level error. Error messages printed out. ">YH_VERB_ERR</a>, <a class="el" href="yubihsm_8h.html#a15dbe0ac973691939ca6e9148b181ccd" title="Debug level all. All previous options enabled. ">YH_VERB_ALL</a> </dd></dl>

</div>
</div>
<a id="a5392844a98c6220c69fe08d3dcf8f1bc"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5392844a98c6220c69fe08d3dcf8f1bc">&#9670;&nbsp;</a></span>yh_init()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a> yh_init </td>
          <td>(</td>
          <td class="paramtype">void&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Global library initialization. </p>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a405155512dc2284dc210ed15be1d0815" title="Returned value when function was successful. ">YHR_SUCCESS</a> </dd></dl>

</div>
</div>
<a id="a9c700747902a722d6c1d2073277de294"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9c700747902a722d6c1d2073277de294">&#9670;&nbsp;</a></span>yh_init_connector()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a> yh_init_connector </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>url</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="yubihsm_8h.html#a114f98fee4b67eadd9b89b675632c710">yh_connector</a> **&#160;</td>
          <td class="paramname"><em>connector</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Instantiate a new connector. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">url</td><td>URL associated with this connector </td></tr>
    <tr><td class="paramname">connector</td><td>Connector to the device</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a405155512dc2284dc210ed15be1d0815" title="Returned value when function was successful. ">YHR_SUCCESS</a> if successful. <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a731b3992b45fde61b6760d92de4dbbf5" title="Returned value when an argument to a function is invalid. ">YHR_INVALID_PARAMETERS</a> if either the URL or the connector are NULL. <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a39fbc5bce29b178582419ae9d31ad252" title="Return value when encountering an unknown error. ">YHR_GENERIC_ERROR</a> if failed to load the backend. <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a75ea079345046cdbf5612bf9065d8711" title="Returned value when unable to allocate memory. ">YHR_MEMORY_ERROR</a> if failed to allocate memory for the connector. <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366ae4f6537a9d33914ea06c53b015d92ca8" title="Returned value when a connection error was encountered. ">YHR_CONNECTION_ERROR</a> if failed to create the connector </dd></dl>

</div>
</div>
<a id="a3032a8f45bfad36ed6157b0158dd7921"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3032a8f45bfad36ed6157b0158dd7921">&#9670;&nbsp;</a></span>yh_is_ec()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool yh_is_ec </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55ca">yh_algorithm</a>&#160;</td>
          <td class="paramname"><em>algorithm</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Check if an algorithm is a supported Elliptic Curve algorithm. </p>
<p>Supported EC algorithms: <a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55caaedcbc07d82b18ca5c21eb3379a6cc010" title="ecp224 ">YH_ALGO_EC_P224</a>, <a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55caae4b191baf5c65f9234120080264d129b" title="ecp256 ">YH_ALGO_EC_P256</a>, <a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55caa31094c17c66e4c365ca3dad353bc8bda" title="ecp384 ">YH_ALGO_EC_P384</a>, <a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55caa05aec903fd67851f968aaa606fe2138a" title="ecp521 ">YH_ALGO_EC_P521</a>, <a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55caad423056b13955068935dc8b3ac0e65d1" title="eck256 ">YH_ALGO_EC_K256</a>, <a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55caabd995726d45b6dd2388775db4767c80d" title="ecbp256 ">YH_ALGO_EC_BP256</a>, <a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55caa228fd3332b55c60438dfea6a1b09af36" title="ecbp384 ">YH_ALGO_EC_BP384</a> and <a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55caab9c1be17b7b3f755346ff8c3cca3ed25" title="ecbp512 ">YH_ALGO_EC_BP512</a></p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">algorithm</td><td>Algorithm to check. See <a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55ca" title="Algorithms. ">yh_algorithm</a></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>True if the algorithm is one of the supported EC algorithms. False otherwise </dd></dl>

</div>
</div>
<a id="a16fbf4426acbf42695c4ec4738b6ae8a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a16fbf4426acbf42695c4ec4738b6ae8a">&#9670;&nbsp;</a></span>yh_is_ed()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool yh_is_ed </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55ca">yh_algorithm</a>&#160;</td>
          <td class="paramname"><em>algorithm</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Check if an algorithm is a supported ED algorithm. </p>
<p>Supported ED algorithms: <a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55caa68c2c97f16c36f727e41a899d8a7e8bd" title="ed25519 ">YH_ALGO_EC_ED25519</a></p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">algorithm</td><td>algorithm. See <a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55ca" title="Algorithms. ">yh_algorithm</a></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>True if the algorithm is <a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55caa68c2c97f16c36f727e41a899d8a7e8bd" title="ed25519 ">YH_ALGO_EC_ED25519</a>. False otherwise </dd></dl>

</div>
</div>
<a id="acb19de78e7d1aed72abbed5c74c676bc"></a>
<h2 class="memtitle"><span class="permalink"><a href="#acb19de78e7d1aed72abbed5c74c676bc">&#9670;&nbsp;</a></span>yh_is_hmac()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool yh_is_hmac </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55ca">yh_algorithm</a>&#160;</td>
          <td class="paramname"><em>algorithm</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Check if algorithm is a supported HMAC algorithm. </p>
<p>Supported HMAC algorithms: <a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55caa942e65c8cd0034eebe9a20c2297c7b06" title="hmac-sha1 ">YH_ALGO_HMAC_SHA1</a>, <a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55caab0a0e1eb424b61057f159f1e53311f5c" title="hmac-sha256 ">YH_ALGO_HMAC_SHA256</a>, <a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55caa781e7ca62563917d2129bde8ec53401b" title="hmac-sha384 ">YH_ALGO_HMAC_SHA384</a> and <a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55caa72d6c7ea77f10e39bbadc8b58d55b9ec" title="hmac-sha512 ">YH_ALGO_HMAC_SHA512</a></p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">algorithm</td><td>Algorithm to check. See <a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55ca" title="Algorithms. ">yh_algorithm</a></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>True if the algorithm is one of the supported HMAC algorithms. False otherwise </dd></dl>

</div>
</div>
<a id="a0a67155f2a7970ecb52e4f6aac6bbe84"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0a67155f2a7970ecb52e4f6aac6bbe84">&#9670;&nbsp;</a></span>yh_is_rsa()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool yh_is_rsa </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55ca">yh_algorithm</a>&#160;</td>
          <td class="paramname"><em>algorithm</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Check if an algorithm is a supported RSA algorithm. </p>
<p>Supported RSA algorithms: <a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55caaafe94e6a770edb51c6db84f77d98d2c6" title="rsa2048 ">YH_ALGO_RSA_2048</a>, <a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55caafd3fbd9ed86caf267ccc77cb24d44426" title="rsa3072 ">YH_ALGO_RSA_3072</a> and <a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55caae5963322a0a0f43a1b74faa78e3a7329" title="rsa4096 ">YH_ALGO_RSA_4096</a></p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">algorithm</td><td>Algorithm to check. See <a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55ca" title="Algorithms. ">yh_algorithm</a></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>True if the algorithm is one of the supported RSA algorithms . False otherwise </dd></dl>

</div>
</div>
<a id="afcca1608845e7a783d41d8ffd6aac8ed"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afcca1608845e7a783d41d8ffd6aac8ed">&#9670;&nbsp;</a></span>yh_merge_capabilities()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a> yh_merge_capabilities </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structyh__capabilities.html">yh_capabilities</a> *&#160;</td>
          <td class="paramname"><em>a</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structyh__capabilities.html">yh_capabilities</a> *&#160;</td>
          <td class="paramname"><em>b</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structyh__capabilities.html">yh_capabilities</a> *&#160;</td>
          <td class="paramname"><em>result</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Merge two sets of capabilities. </p>
<p>The resulting set of capabilities contain all capabilities from both arrays</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">a</td><td>Array of <a class="el" href="structyh__capabilities.html" title="Capabilities representation. ">yh_capabilities</a> </td></tr>
    <tr><td class="paramname">b</td><td>Array of <a class="el" href="structyh__capabilities.html" title="Capabilities representation. ">yh_capabilities</a> </td></tr>
    <tr><td class="paramname">result</td><td>Resulting array of <a class="el" href="structyh__capabilities.html" title="Capabilities representation. ">yh_capabilities</a></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a405155512dc2284dc210ed15be1d0815" title="Returned value when function was successful. ">YHR_SUCCESS</a> if successful. <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a731b3992b45fde61b6760d92de4dbbf5" title="Returned value when an argument to a function is invalid. ">YHR_INVALID_PARAMETERS</a> if input parameters are NULL.</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a href="https://developers.yubico.com/YubiHSM2/Concepts/Capability.html">Capability</a> </dd></dl>

</div>
</div>
<a id="a799e299be8d4c13dfa2112a60d05480d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a799e299be8d4c13dfa2112a60d05480d">&#9670;&nbsp;</a></span>yh_send_plain_msg()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a> yh_send_plain_msg </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="yubihsm_8h.html#a114f98fee4b67eadd9b89b675632c710">yh_connector</a> *&#160;</td>
          <td class="paramname"><em>connector</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="yubihsm_8h.html#aa5415bafa9c48dfef0e183d8df504b7e">yh_cmd</a>&#160;</td>
          <td class="paramname"><em>cmd</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const uint8_t *&#160;</td>
          <td class="paramname"><em>data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>data_len</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="yubihsm_8h.html#aa5415bafa9c48dfef0e183d8df504b7e">yh_cmd</a> *&#160;</td>
          <td class="paramname"><em>response_cmd</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t *&#160;</td>
          <td class="paramname"><em>response</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t *&#160;</td>
          <td class="paramname"><em>response_len</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Send a plain (unencrypted) message to the device through a connector. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">connector</td><td>Connector to the device </td></tr>
    <tr><td class="paramname">cmd</td><td>Command to send. See <a class="el" href="yubihsm_8h.html#aa5415bafa9c48dfef0e183d8df504b7e" title="Command definitions. ">yh_cmd</a> </td></tr>
    <tr><td class="paramname">data</td><td>Data to send </td></tr>
    <tr><td class="paramname">data_len</td><td>length of data to send </td></tr>
    <tr><td class="paramname">response_cmd</td><td>Response command </td></tr>
    <tr><td class="paramname">response</td><td>Response data </td></tr>
    <tr><td class="paramname">response_len</td><td>Length of response data</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a405155512dc2284dc210ed15be1d0815" title="Returned value when function was successful. ">YHR_SUCCESS</a> if successful. <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a731b3992b45fde61b6760d92de4dbbf5" title="Returned value when an argument to a function is invalid. ">YHR_INVALID_PARAMETERS</a> if input parameters are NULL. <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366ad8971a0b9647564b76b3f4e4b662c965" title="Returned value when there is not enough space to store data. ">YHR_BUFFER_TOO_SMALL</a> if the actual response was longer than response_len. See <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366" title="Return codes. ">yh_rc</a> for other possible errors </dd></dl>

</div>
</div>
<a id="a4c26f003b72e800e9c934bca922a404a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4c26f003b72e800e9c934bca922a404a">&#9670;&nbsp;</a></span>yh_send_secure_msg()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a> yh_send_secure_msg </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="yubihsm_8h.html#aa3420d8ccc1fb0b0dee1af5a53cc79de">yh_session</a> *&#160;</td>
          <td class="paramname"><em>session</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="yubihsm_8h.html#aa5415bafa9c48dfef0e183d8df504b7e">yh_cmd</a>&#160;</td>
          <td class="paramname"><em>cmd</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const uint8_t *&#160;</td>
          <td class="paramname"><em>data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>data_len</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="yubihsm_8h.html#aa5415bafa9c48dfef0e183d8df504b7e">yh_cmd</a> *&#160;</td>
          <td class="paramname"><em>response_cmd</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t *&#160;</td>
          <td class="paramname"><em>response</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t *&#160;</td>
          <td class="paramname"><em>response_len</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Send an encrypted message to the device over a session. </p>
<p>The session has to be authenticated</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">session</td><td>Session to send the message over </td></tr>
    <tr><td class="paramname">cmd</td><td>Command to send </td></tr>
    <tr><td class="paramname">data</td><td>Data to send </td></tr>
    <tr><td class="paramname">data_len</td><td>Length of data to send </td></tr>
    <tr><td class="paramname">response_cmd</td><td>Response command </td></tr>
    <tr><td class="paramname">response</td><td>Response data </td></tr>
    <tr><td class="paramname">response_len</td><td>Length of response data</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a405155512dc2284dc210ed15be1d0815" title="Returned value when function was successful. ">YHR_SUCCESS</a> if successful. See <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366" title="Return codes. ">yh_rc</a> for possible errors </dd></dl>

</div>
</div>
<a id="a9addbfae4cdb70b819986e7769cdd102"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9addbfae4cdb70b819986e7769cdd102">&#9670;&nbsp;</a></span>yh_set_connector_option()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a> yh_set_connector_option </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="yubihsm_8h.html#a114f98fee4b67eadd9b89b675632c710">yh_connector</a> *&#160;</td>
          <td class="paramname"><em>connector</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="yubihsm_8h.html#a59400bce0478b88e048d5e62b2b0b015">yh_connector_option</a>&#160;</td>
          <td class="paramname"><em>opt</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const void *&#160;</td>
          <td class="paramname"><em>val</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set connector options. </p>
<p>Note that backend options are not supported with winhttp or USB connectors</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">connector</td><td>Connector to set an option on </td></tr>
    <tr><td class="paramname">opt</td><td>Option to set. See <a class="el" href="yubihsm_8h.html#a59400bce0478b88e048d5e62b2b0b015" title="Options for the connector, set with yh_set_connector_option() ">yh_connector_option</a> </td></tr>
    <tr><td class="paramname">val</td><td>Value of the option. Type of value is specific to the given option</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a405155512dc2284dc210ed15be1d0815" title="Returned value when function was successful. ">YHR_SUCCESS</a> if successful. <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a731b3992b45fde61b6760d92de4dbbf5" title="Returned value when an argument to a function is invalid. ">YHR_INVALID_PARAMETERS</a> if the connector or the value are NULL or if the option is unknown. <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366ad9339b4f96ca48d9c987ce1e05596fe9" title="Return value when connector operation failed. ">YHR_CONNECTOR_ERROR</a> if failed to set the option </dd></dl>

</div>
</div>
<a id="a7d223fd4ee6ae3f578307d72aba37a19"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7d223fd4ee6ae3f578307d72aba37a19">&#9670;&nbsp;</a></span>yh_set_debug_output()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void yh_set_debug_output </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="yubihsm_8h.html#a114f98fee4b67eadd9b89b675632c710">yh_connector</a> *&#160;</td>
          <td class="paramname"><em>connector</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">FILE *&#160;</td>
          <td class="paramname"><em>output</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set file for debug output. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">connector</td><td>If not NULL, the debug messages will be written to the specified output file </td></tr>
    <tr><td class="paramname">output</td><td>The destination of the debug messages</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>void </dd></dl>

</div>
</div>
<a id="a24c3146e51242256af505961e763f417"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a24c3146e51242256af505961e763f417">&#9670;&nbsp;</a></span>yh_set_verbosity()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a> yh_set_verbosity </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="yubihsm_8h.html#a114f98fee4b67eadd9b89b675632c710">yh_connector</a> *&#160;</td>
          <td class="paramname"><em>connector</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>verbosity</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set verbosity level when executing commands. </p>
<p>Default verbosity is <a class="el" href="yubihsm_8h.html#aa11030bbf6092d8934236958e9478084" title="Debug level quiet. No messages printed out. ">YH_VERB_QUIET</a></p>
<p>This function may be called prior to global library initialization to set the debug level</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">connector</td><td>If not NULL, the verbosity of the specific connector will be set </td></tr>
    <tr><td class="paramname">verbosity</td><td>The desired level of debug output</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a405155512dc2284dc210ed15be1d0815" title="Returned value when function was successful. ">YHR_SUCCESS</a></dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="yubihsm_8h.html#aa11030bbf6092d8934236958e9478084" title="Debug level quiet. No messages printed out. ">YH_VERB_QUIET</a>, <a class="el" href="yubihsm_8h.html#af507fefd9d19bfd531277a6c6cb56452" title="Debug level intermediate. Intermediate results printed out. ">YH_VERB_INTERMEDIATE</a>, <a class="el" href="yubihsm_8h.html#a8881b983de3922f9abb5d1fcc99216e2" title="Debug level crypto. Crypto results printed out. ">YH_VERB_CRYPTO</a>, <a class="el" href="yubihsm_8h.html#a4ead07ea7b1232808085d4bdbc7eb5b9" title="Debug level raw. Raw messages printed out. ">YH_VERB_RAW</a>, <a class="el" href="yubihsm_8h.html#a2ac0b183de01f2dc9f64372e6c66bba4" title="Debug level info. General information messages printed out. ">YH_VERB_INFO</a>, <a class="el" href="yubihsm_8h.html#a978bb82a3974b6778aadb56fa450e8ca" title="Debug level error. Error messages printed out. ">YH_VERB_ERR</a>, <a class="el" href="yubihsm_8h.html#a15dbe0ac973691939ca6e9148b181ccd" title="Debug level all. All previous options enabled. ">YH_VERB_ALL</a> </dd></dl>

</div>
</div>
<a id="ab2ca147574f7aa4ba01ee0c52d716b3f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab2ca147574f7aa4ba01ee0c52d716b3f">&#9670;&nbsp;</a></span>yh_strerror()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const char* yh_strerror </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a>&#160;</td>
          <td class="paramname"><em>err</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Return a string describing an error condition. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">err</td><td><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366" title="Return codes. ">yh_rc</a> error code</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>String with descriptive error </dd></dl>

</div>
</div>
<a id="aad9943d12261cc0f0cada93cbd6d0704"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aad9943d12261cc0f0cada93cbd6d0704">&#9670;&nbsp;</a></span>yh_string_to_algo()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a> yh_string_to_algo </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>string</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55ca">yh_algorithm</a> *&#160;</td>
          <td class="paramname"><em>algo</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Convert a string to an algorithm's numeric value. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">string</td><td>Algorithm as string. See <a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55ca" title="Algorithms. ">yh_algorithm</a> </td></tr>
    <tr><td class="paramname">algo</td><td>Algorithm numeric value</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a405155512dc2284dc210ed15be1d0815" title="Returned value when function was successful. ">YHR_SUCCESS</a> if successful. <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a731b3992b45fde61b6760d92de4dbbf5" title="Returned value when an argument to a function is invalid. ">YHR_INVALID_PARAMETERS</a> if input parameters are NULL or if the algorithm is not supported by YubiHSM 2.</dd></dl>
<dl class="section user"><dt>Code sample</dt><dd><pre class="fragment">yh_algorithm algorithm;
//yh_string_to_algo(NULL, &amp;algorithm) =&gt; YHR_INVALID_PARAMETERS
//yh_string_to_algo("something", NULL) =&gt; YHR_INVALID_PARAMETERS
//yh_string_to_algo("something", &amp;algorithm) =&gt; YHR_INVALID_PARAMETERS
//yh_string_to_algo("rsa-pkcs1-sha1", &amp;algorithm) =&gt;
</pre> YH_ALGO_RSA_PKCS1_SHA1 //yh_string_to_algo("rsa2048", &amp;algorithm) =&gt; YH_ALGO_RSA_2048</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a href="https://developers.yubico.com/YubiHSM2/Concepts/Algorithms.html">Algorithms</a> </dd></dl>

</div>
</div>
<a id="aab440e1cb671d9ba7a2e7d1243960e42"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aab440e1cb671d9ba7a2e7d1243960e42">&#9670;&nbsp;</a></span>yh_string_to_capabilities()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a> yh_string_to_capabilities </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>capability</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structyh__capabilities.html">yh_capabilities</a> *&#160;</td>
          <td class="paramname"><em>result</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Convert capability string to byte array. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">capability</td><td>String of capabilities separated by ',', ':' or '|' </td></tr>
    <tr><td class="paramname">result</td><td>Array of <a class="el" href="structyh__capabilities.html" title="Capabilities representation. ">yh_capabilities</a></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a405155512dc2284dc210ed15be1d0815" title="Returned value when function was successful. ">YHR_SUCCESS</a> if successful. <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a731b3992b45fde61b6760d92de4dbbf5" title="Returned value when an argument to a function is invalid. ">YHR_INVALID_PARAMETERS</a> if input parameters are NULL. <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366ad8971a0b9647564b76b3f4e4b662c965" title="Returned value when there is not enough space to store data. ">YHR_BUFFER_TOO_SMALL</a> if <code>capability</code> is too big</dd></dl>
<dl class="section user"><dt>Examples:</dt><dd></dd></dl>
<ul>
<li>"get-opaque" =&gt; {"\x00\x00\x00\x00\x00\x00\x00\x01"}</li>
<li>"sign-hmac:verify-hmac|exportable-under-wrap," =&gt; {"\x00\x00\x00\x00\x00\xc1\x00\x00"}</li>
<li>",,unwrap-data|:wrap-data,,," =&gt; {"\x00\x00\x00\x60\x00\x00\x00\x00"}</li>
<li>"0x7fffffffffffffff" =&gt; {"\x7f\xff\xff\xff\xff\xff\xff\xff"}</li>
<li>"0xffffffffffffffff" =&gt; {"\xff\xff\xff\xff\xff\xff\xff\xff"}</li>
</ul>
<dl class="section see"><dt>See also</dt><dd><a href="https://developers.yubico.com/YubiHSM2/Concepts/Capability.html">Capability</a> </dd></dl>

</div>
</div>
<a id="a96a4c751a281515d5610adb8fd779438"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a96a4c751a281515d5610adb8fd779438">&#9670;&nbsp;</a></span>yh_string_to_domains()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a> yh_string_to_domains </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>domains</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t *&#160;</td>
          <td class="paramname"><em>result</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Convert a string to a domain's numeric value. </p>
<p>The domains string can contain one or several domains separated by ',', ':' or '|'. Each domain can be written in decimal or hex format</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">domains</td><td>String of domains </td></tr>
    <tr><td class="paramname">result</td><td>Resulting parsed domains as an unsigned int</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a405155512dc2284dc210ed15be1d0815" title="Returned value when function was successful. ">YHR_SUCCESS</a> if successful. <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a731b3992b45fde61b6760d92de4dbbf5" title="Returned value when an argument to a function is invalid. ">YHR_INVALID_PARAMETERS</a> if input parameters are NULL, if the domains string is does not contains the expected values</dd></dl>
<dl class="section user"><dt>Examples</dt><dd></dd></dl>
<ul>
<li>"1" =&gt; 1</li>
<li>"1,2:3,4|5,6;7,8,9,10,11,12,13,14,15,16" =&gt; 0xffff</li>
<li>"1,16" =&gt; 0x8001</li>
<li>"16" =&gt; 0x8000</li>
<li>"16,15" =&gt; 0xc000</li>
<li>"1,0xf" =&gt; 0x4001</li>
<li>"0x1,0x2" =&gt; 3</li>
<li>"0x8888" =&gt; 0x8888</li>
<li>"0" =&gt; 0</li>
<li>"all" =&gt; 0xffff</li>
<li>"2" =&gt; 2</li>
<li>"2:4" =&gt; 10</li>
</ul>
<dl class="section see"><dt>See also</dt><dd><a href="https://developers.yubico.com/YubiHSM2/Concepts/Domain.html">Domains</a> </dd></dl>

</div>
</div>
<a id="a5464c7a6ad858c1e4e42e588b406c2d3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5464c7a6ad858c1e4e42e588b406c2d3">&#9670;&nbsp;</a></span>yh_string_to_option()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a> yh_string_to_option </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>string</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="yubihsm_8h.html#acc8090ce0ec5029b376803e44b1cb4aa">yh_option</a> *&#160;</td>
          <td class="paramname"><em>option</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Convert a string to an option's numeric value. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">string</td><td>Option as string. See <a class="el" href="yubihsm_8h.html#acc8090ce0ec5029b376803e44b1cb4aa" title="Global options. ">yh_option</a> </td></tr>
    <tr><td class="paramname">option</td><td>Option numeric value</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a405155512dc2284dc210ed15be1d0815" title="Returned value when function was successful. ">YHR_SUCCESS</a> if successful. <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a731b3992b45fde61b6760d92de4dbbf5" title="Returned value when an argument to a function is invalid. ">YHR_INVALID_PARAMETERS</a> if input parameters are NULL or if the option was not recognized.</dd></dl>
<dl class="section user"><dt>Code sample</dt><dd><pre class="fragment">yh_option option;
//yh_string_to_option(NULL, &amp;option) =&gt; YHR_INVALID_PARAMETERS
//yh_string_to_option("something", NULL) =&gt; YHR_INVALID_PARAMETERS
//yh_string_to_option("something", &amp;option) =&gt; YHR_INVALID_PARAMETERS
//yh_string_to_option("force-audit", &amp;option) =&gt;
</pre> option=YH_OPTION_FORCE_AUDIT</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a href="https://developers.yubico.com/YubiHSM2/Concepts/Options.html">Options</a> </dd></dl>

</div>
</div>
<a id="a57cdfa4b6224bd2c4a8bab24513475d8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a57cdfa4b6224bd2c4a8bab24513475d8">&#9670;&nbsp;</a></span>yh_string_to_type()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a> yh_string_to_type </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>string</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="yubihsm_8h.html#a2fe39512cb4df34b270a67dbb8e13583">yh_object_type</a> *&#160;</td>
          <td class="paramname"><em>type</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Convert a string to a type's numeric value. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">string</td><td>Type as a String. See <a class="el" href="yubihsm_8h.html#a2fe39512cb4df34b270a67dbb8e13583" title="Object types. ">yh_object_type</a> </td></tr>
    <tr><td class="paramname">type</td><td>Type numeric value</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a405155512dc2284dc210ed15be1d0815" title="Returned value when function was successful. ">YHR_SUCCESS</a> if successful. <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a731b3992b45fde61b6760d92de4dbbf5" title="Returned value when an argument to a function is invalid. ">YHR_INVALID_PARAMETERS</a> if input parameters are NULL or if the type was not recognized.</dd></dl>
<dl class="section user"><dt>Code sample</dt><dd><pre class="fragment">yh_object_type type;
//yh_string_to_type(NULL, &amp;type) =&gt; YHR_INVALID_PARAMETERS
//yh_string_to_type("something", NULL) =&gt; YHR_INVALID_PARAMETERS
//yh_string_to_type("something", &amp;type) =&gt; YHR_INVALID_PARAMETERS
//yh_string_to_type("opaque", &amp;type) =&gt; type=YH_OPAQUE
//yh_string_to_type("authentication-key", &amp;type) =&gt;
</pre> type=YH_AUTHENTICATION_KEY</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a href="https://developers.yubico.com/YubiHSM2/Concepts/Object.html">Object</a> </dd></dl>

</div>
</div>
<a id="afe3d701f7470c1d7b05480e4b6728bf7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afe3d701f7470c1d7b05480e4b6728bf7">&#9670;&nbsp;</a></span>yh_type_to_string()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a> yh_type_to_string </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="yubihsm_8h.html#a2fe39512cb4df34b270a67dbb8e13583">yh_object_type</a>&#160;</td>
          <td class="paramname"><em>type</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char const **&#160;</td>
          <td class="paramname"><em>result</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Convert a <a class="el" href="yubihsm_8h.html#a2fe39512cb4df34b270a67dbb8e13583" title="Object types. ">yh_object_type</a> to its string representation. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">type</td><td>Type to convert. See <a class="el" href="yubihsm_8h.html#a2fe39512cb4df34b270a67dbb8e13583" title="Object types. ">yh_object_type</a> </td></tr>
    <tr><td class="paramname">result</td><td>The type as a String. "Unknown" if the type was not recognized</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a405155512dc2284dc210ed15be1d0815" title="Returned value when function was successful. ">YHR_SUCCESS</a> if successful. <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a731b3992b45fde61b6760d92de4dbbf5" title="Returned value when an argument to a function is invalid. ">YHR_INVALID_PARAMETERS</a> if <code>result</code> is NULL.</dd></dl>
<dl class="section user"><dt>Code sample</dt><dd><pre class="fragment">const char *string;
//yh_type_to_string(0, NULL) =&gt; YHR_INVALID_PARAMETERS
//yh_type_to_string(99, &amp;string) =&gt; string="Unknown"
//yh_type_to_string(YH_OPAQUE, &amp;string) =&gt; string="opaque"
//yh_type_to_string(YH_AUTHENTICATION_KEY, &amp;string) =&gt;
</pre> string="authentication-key"</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a href="https://developers.yubico.com/YubiHSM2/Concepts/Object.html">Object</a> </dd></dl>

</div>
</div>
<a id="ad112fe09ee88d595333fa87e8059717b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad112fe09ee88d595333fa87e8059717b">&#9670;&nbsp;</a></span>yh_util_blink_device()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a> yh_util_blink_device </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="yubihsm_8h.html#aa3420d8ccc1fb0b0dee1af5a53cc79de">yh_session</a> *&#160;</td>
          <td class="paramname"><em>session</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t&#160;</td>
          <td class="paramname"><em>seconds</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Blink the LED of the device to identify it. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">session</td><td>Authenticated session to use </td></tr>
    <tr><td class="paramname">seconds</td><td>Number of seconds to blink</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a405155512dc2284dc210ed15be1d0815" title="Returned value when function was successful. ">YHR_SUCCESS</a> if successful. <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a731b3992b45fde61b6760d92de4dbbf5" title="Returned value when an argument to a function is invalid. ">YHR_INVALID_PARAMETERS</a> if the session is NULL. See <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366" title="Return codes. ">yh_rc</a> for other possible errors </dd></dl>

</div>
</div>
<a id="a8f229874e387887d7c5b4c7e6e07db8e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8f229874e387887d7c5b4c7e6e07db8e">&#9670;&nbsp;</a></span>yh_util_change_authentication_key()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a> yh_util_change_authentication_key </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="yubihsm_8h.html#aa3420d8ccc1fb0b0dee1af5a53cc79de">yh_session</a> *&#160;</td>
          <td class="paramname"><em>session</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t *&#160;</td>
          <td class="paramname"><em>key_id</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const uint8_t *&#160;</td>
          <td class="paramname"><em>key_enc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>key_enc_len</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const uint8_t *&#160;</td>
          <td class="paramname"><em>key_mac</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>key_mac_len</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Replace the long lived encryption key and MAC key associated with an <a class="el" href="yubihsm_8h.html#a2fe39512cb4df34b270a67dbb8e13583acee44b775b3c5b6157f0732699935074" title="Authentication Key is used to establish Sessions with a device. ">YH_AUTHENTICATION_KEY</a> in the device. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">session</td><td>Authenticated session to use </td></tr>
    <tr><td class="paramname">key_id</td><td>Object ID of the key to replace </td></tr>
    <tr><td class="paramname">key_enc</td><td>New long lived encryption key </td></tr>
    <tr><td class="paramname">key_enc_len</td><td>Length of the new encryption key. Must be <a class="el" href="yubihsm_8h.html#ac2737b2a34c26d0258d25e34993df391" title="Length of authentication keys. ">YH_KEY_LEN</a> </td></tr>
    <tr><td class="paramname">key_mac</td><td>New long lived MAC key </td></tr>
    <tr><td class="paramname">key_mac_len</td><td>Length of the new MAC key. Must be <a class="el" href="yubihsm_8h.html#ac2737b2a34c26d0258d25e34993df391" title="Length of authentication keys. ">YH_KEY_LEN</a></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a405155512dc2284dc210ed15be1d0815" title="Returned value when function was successful. ">YHR_SUCCESS</a> if successful. <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a731b3992b45fde61b6760d92de4dbbf5" title="Returned value when an argument to a function is invalid. ">YHR_INVALID_PARAMETERS</a> if input parameters are NULL or if <code>key_enc_len</code> or <code>key_mac_len</code> are not the expected values. See <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366" title="Return codes. ">yh_rc</a> for other possible errors</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a href="https://developers.yubico.com/YubiHSM2/Concepts/Object.html">Authentication Key</a> </dd></dl>

</div>
</div>
<a id="a8761bd8bcffcee4af737bda255ce5e53"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8761bd8bcffcee4af737bda255ce5e53">&#9670;&nbsp;</a></span>yh_util_change_authentication_key_derived()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a> yh_util_change_authentication_key_derived </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="yubihsm_8h.html#aa3420d8ccc1fb0b0dee1af5a53cc79de">yh_session</a> *&#160;</td>
          <td class="paramname"><em>session</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t *&#160;</td>
          <td class="paramname"><em>key_id</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const uint8_t *&#160;</td>
          <td class="paramname"><em>password</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>password_len</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Replace the long lived encryption key and MAC key associated with an <a class="el" href="yubihsm_8h.html#a2fe39512cb4df34b270a67dbb8e13583acee44b775b3c5b6157f0732699935074" title="Authentication Key is used to establish Sessions with a device. ">YH_AUTHENTICATION_KEY</a> in the device with keys derived from a password. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">session</td><td>Authenticated session to use </td></tr>
    <tr><td class="paramname">key_id</td><td>Object ID of the key to replace </td></tr>
    <tr><td class="paramname">password</td><td>Password to derive the new encryption key and MAC key </td></tr>
    <tr><td class="paramname">password_len</td><td>Length of password</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a405155512dc2284dc210ed15be1d0815" title="Returned value when function was successful. ">YHR_SUCCESS</a> if successful. <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a731b3992b45fde61b6760d92de4dbbf5" title="Returned value when an argument to a function is invalid. ">YHR_INVALID_PARAMETERS</a> if input parameters are NULL. See <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366" title="Return codes. ">yh_rc</a> for other possible errors</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a href="https://developers.yubico.com/YubiHSM2/Concepts/Object.html">Authentication Key</a> </dd></dl>

</div>
</div>
<a id="a61ab8dbab67b1cceb49cd306f8c3f4b1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a61ab8dbab67b1cceb49cd306f8c3f4b1">&#9670;&nbsp;</a></span>yh_util_close_session()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a> yh_util_close_session </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="yubihsm_8h.html#aa3420d8ccc1fb0b0dee1af5a53cc79de">yh_session</a> *&#160;</td>
          <td class="paramname"><em>session</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Close a session. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">session</td><td>Session to close</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a405155512dc2284dc210ed15be1d0815" title="Returned value when function was successful. ">YHR_SUCCESS</a> if successful. <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a731b3992b45fde61b6760d92de4dbbf5" title="Returned value when an argument to a function is invalid. ">YHR_INVALID_PARAMETERS</a> if the session is NULL. See <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366" title="Return codes. ">yh_rc</a> for other possible errors </dd></dl>

</div>
</div>
<a id="a82d295a02d9eb628f6dea4b4c01fdec4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a82d295a02d9eb628f6dea4b4c01fdec4">&#9670;&nbsp;</a></span>yh_util_create_otp_aead()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a> yh_util_create_otp_aead </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="yubihsm_8h.html#aa3420d8ccc1fb0b0dee1af5a53cc79de">yh_session</a> *&#160;</td>
          <td class="paramname"><em>session</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t&#160;</td>
          <td class="paramname"><em>key_id</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const uint8_t *&#160;</td>
          <td class="paramname"><em>key</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const uint8_t *&#160;</td>
          <td class="paramname"><em>private_id</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t *&#160;</td>
          <td class="paramname"><em>out</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t *&#160;</td>
          <td class="paramname"><em>out_len</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Create a Yubico OTP AEAD using the provided data. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">session</td><td>Authenticated session to use </td></tr>
    <tr><td class="paramname">key_id</td><td>Object ID of the Otp-aead Key to use </td></tr>
    <tr><td class="paramname">key</td><td>OTP key </td></tr>
    <tr><td class="paramname">private_id</td><td>OTP private id </td></tr>
    <tr><td class="paramname">out</td><td>The created AEAD </td></tr>
    <tr><td class="paramname">out_len</td><td>Length of the created AEAD</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a405155512dc2284dc210ed15be1d0815" title="Returned value when function was successful. ">YHR_SUCCESS</a> if successful. <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a731b3992b45fde61b6760d92de4dbbf5" title="Returned value when an argument to a function is invalid. ">YHR_INVALID_PARAMETERS</a> if input parameters are NULL. See <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366" title="Return codes. ">yh_rc</a> for other possible errors </dd></dl>

</div>
</div>
<a id="aa939f8764ed0cca27884d9c8f640ac14"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa939f8764ed0cca27884d9c8f640ac14">&#9670;&nbsp;</a></span>yh_util_decrypt_oaep()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a> yh_util_decrypt_oaep </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="yubihsm_8h.html#aa3420d8ccc1fb0b0dee1af5a53cc79de">yh_session</a> *&#160;</td>
          <td class="paramname"><em>session</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t&#160;</td>
          <td class="paramname"><em>key_id</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const uint8_t *&#160;</td>
          <td class="paramname"><em>in</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>in_len</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t *&#160;</td>
          <td class="paramname"><em>out</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t *&#160;</td>
          <td class="paramname"><em>out_len</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const uint8_t *&#160;</td>
          <td class="paramname"><em>label</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>label_len</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55ca">yh_algorithm</a>&#160;</td>
          <td class="paramname"><em>mgf1Algo</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Decrypt data using RSA-OAEP. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">session</td><td>Authenticated session to use </td></tr>
    <tr><td class="paramname">key_id</td><td>Object ID of the RSA key to use for decryption </td></tr>
    <tr><td class="paramname">in</td><td>Encrypted data </td></tr>
    <tr><td class="paramname">in_len</td><td>Length of encrypted data. Must be 256, 384 or 512 </td></tr>
    <tr><td class="paramname">out</td><td>Decrypted data </td></tr>
    <tr><td class="paramname">out_len</td><td>Length of decrypted data </td></tr>
    <tr><td class="paramname">label</td><td>OAEP label </td></tr>
    <tr><td class="paramname">label_len</td><td>Length of OAEP label. Must be 20, 32, 48 or 64 </td></tr>
    <tr><td class="paramname">mgf1Algo</td><td>MGF1 algorithm</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a405155512dc2284dc210ed15be1d0815" title="Returned value when function was successful. ">YHR_SUCCESS</a> if successful. <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a731b3992b45fde61b6760d92de4dbbf5" title="Returned value when an argument to a function is invalid. ">YHR_INVALID_PARAMETERS</a> input parameters are NULL. <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366ae0b26dcb22aa228ab08c9e59a8975952" title="Returned value when there is a mismatch between expected and received length of an argument to a func...">YHR_WRONG_LENGTH</a> if <code>in_len</code> or <code>label_len</code> are not what expected. See <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366" title="Return codes. ">yh_rc</a> for other possible errors </dd></dl>

</div>
</div>
<a id="a3677afe2209a1cae31f70a304e260e28"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3677afe2209a1cae31f70a304e260e28">&#9670;&nbsp;</a></span>yh_util_decrypt_otp()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a> yh_util_decrypt_otp </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="yubihsm_8h.html#aa3420d8ccc1fb0b0dee1af5a53cc79de">yh_session</a> *&#160;</td>
          <td class="paramname"><em>session</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t&#160;</td>
          <td class="paramname"><em>key_id</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const uint8_t *&#160;</td>
          <td class="paramname"><em>aead</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>aead_len</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const uint8_t *&#160;</td>
          <td class="paramname"><em>otp</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t *&#160;</td>
          <td class="paramname"><em>useCtr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t *&#160;</td>
          <td class="paramname"><em>sessionCtr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t *&#160;</td>
          <td class="paramname"><em>tstph</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t *&#160;</td>
          <td class="paramname"><em>tstpl</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Decrypt a Yubico OTP and return counters and time information. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">session</td><td>Authenticated session to use </td></tr>
    <tr><td class="paramname">key_id</td><td>Object ID of the key used for decryption </td></tr>
    <tr><td class="paramname">aead</td><td>AEAD as created by <a class="el" href="yubihsm_8h.html#a82d295a02d9eb628f6dea4b4c01fdec4" title="Create a Yubico OTP AEAD using the provided data. ">yh_util_create_otp_aead()</a> or <a class="el" href="yubihsm_8h.html#a4bb1d420f681bc91bd36dc08695dbad6" title="Create OTP AEAD from random data. ">yh_util_randomize_otp_aead()</a> </td></tr>
    <tr><td class="paramname">aead_len</td><td>Length of AEAD </td></tr>
    <tr><td class="paramname">otp</td><td>OTP </td></tr>
    <tr><td class="paramname">useCtr</td><td>OTP use counter </td></tr>
    <tr><td class="paramname">sessionCtr</td><td>OTP session counter </td></tr>
    <tr><td class="paramname">tstph</td><td>OTP timestamp high </td></tr>
    <tr><td class="paramname">tstpl</td><td>OTP timestamp low</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a405155512dc2284dc210ed15be1d0815" title="Returned value when function was successful. ">YHR_SUCCESS</a> if successful. <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a731b3992b45fde61b6760d92de4dbbf5" title="Returned value when an argument to a function is invalid. ">YHR_INVALID_PARAMETERS</a> if input parameters are NULL. See <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366" title="Return codes. ">yh_rc</a> for other possible errors </dd></dl>

</div>
</div>
<a id="a5ebf6932cd2e68b9a23787c27fde3e26"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5ebf6932cd2e68b9a23787c27fde3e26">&#9670;&nbsp;</a></span>yh_util_decrypt_pkcs1v1_5()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a> yh_util_decrypt_pkcs1v1_5 </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="yubihsm_8h.html#aa3420d8ccc1fb0b0dee1af5a53cc79de">yh_session</a> *&#160;</td>
          <td class="paramname"><em>session</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t&#160;</td>
          <td class="paramname"><em>key_id</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const uint8_t *&#160;</td>
          <td class="paramname"><em>in</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>in_len</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t *&#160;</td>
          <td class="paramname"><em>out</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t *&#160;</td>
          <td class="paramname"><em>out_len</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Decrypt data that was encrypted using RSA-PKCS#1v1.5. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">session</td><td>Authenticated session to use </td></tr>
    <tr><td class="paramname">key_id</td><td>Object ID of the RSA key to use for decryption </td></tr>
    <tr><td class="paramname">in</td><td>Encrypted data </td></tr>
    <tr><td class="paramname">in_len</td><td>Length of encrypted data </td></tr>
    <tr><td class="paramname">out</td><td>Decrypted data </td></tr>
    <tr><td class="paramname">out_len</td><td>Length of decrypted data</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a405155512dc2284dc210ed15be1d0815" title="Returned value when function was successful. ">YHR_SUCCESS</a> if successful. <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a731b3992b45fde61b6760d92de4dbbf5" title="Returned value when an argument to a function is invalid. ">YHR_INVALID_PARAMETERS</a> input parameters are NULL or if <code>in_len</code> is bigger than <a class="el" href="yubihsm_8h.html#a706bd8e7adf0de85e6cfb0efc8981d3f" title="Maximum length of message buffer. ">YH_MSG_BUF_SIZE</a>-2. See <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366" title="Return codes. ">yh_rc</a> for other possible errors </dd></dl>

</div>
</div>
<a id="ae736702f9463878db4adfd45b6a597f9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae736702f9463878db4adfd45b6a597f9">&#9670;&nbsp;</a></span>yh_util_delete_object()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a> yh_util_delete_object </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="yubihsm_8h.html#aa3420d8ccc1fb0b0dee1af5a53cc79de">yh_session</a> *&#160;</td>
          <td class="paramname"><em>session</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t&#160;</td>
          <td class="paramname"><em>id</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="yubihsm_8h.html#a2fe39512cb4df34b270a67dbb8e13583">yh_object_type</a>&#160;</td>
          <td class="paramname"><em>type</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Delete an object in the device. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">session</td><td>Authenticated session to use </td></tr>
    <tr><td class="paramname">id</td><td>Object ID of the object to delete </td></tr>
    <tr><td class="paramname">type</td><td>Type of object to delete. See <a class="el" href="yubihsm_8h.html#a2fe39512cb4df34b270a67dbb8e13583" title="Object types. ">yh_object_type</a></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a405155512dc2284dc210ed15be1d0815" title="Returned value when function was successful. ">YHR_SUCCESS</a> if successful. <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a731b3992b45fde61b6760d92de4dbbf5" title="Returned value when an argument to a function is invalid. ">YHR_INVALID_PARAMETERS</a> if session is NULL. See <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366" title="Return codes. ">yh_rc</a> for other possible errors </dd></dl>

</div>
</div>
<a id="a2900aee87732f9ec017bd1662bcef7e9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2900aee87732f9ec017bd1662bcef7e9">&#9670;&nbsp;</a></span>yh_util_derive_ecdh()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a> yh_util_derive_ecdh </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="yubihsm_8h.html#aa3420d8ccc1fb0b0dee1af5a53cc79de">yh_session</a> *&#160;</td>
          <td class="paramname"><em>session</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t&#160;</td>
          <td class="paramname"><em>key_id</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const uint8_t *&#160;</td>
          <td class="paramname"><em>in</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>in_len</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t *&#160;</td>
          <td class="paramname"><em>out</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t *&#160;</td>
          <td class="paramname"><em>out_len</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Derive an ECDH key from a private EC key on the device and a provided public EC key. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">session</td><td>Authenticated session to use </td></tr>
    <tr><td class="paramname">key_id</td><td>Object ID of the EC private key to use for ECDH derivation </td></tr>
    <tr><td class="paramname">in</td><td>Public key of another EC key-pair </td></tr>
    <tr><td class="paramname">in_len</td><td>Length of public key </td></tr>
    <tr><td class="paramname">out</td><td>Shared secret ECDH key </td></tr>
    <tr><td class="paramname">out_len</td><td>Length of the shared ECDH key</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a405155512dc2284dc210ed15be1d0815" title="Returned value when function was successful. ">YHR_SUCCESS</a> if successful. <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a731b3992b45fde61b6760d92de4dbbf5" title="Returned value when an argument to a function is invalid. ">YHR_INVALID_PARAMETERS</a> input parameters are NULL or if <code>in_len</code> is bigger than <a class="el" href="yubihsm_8h.html#a706bd8e7adf0de85e6cfb0efc8981d3f" title="Maximum length of message buffer. ">YH_MSG_BUF_SIZE</a>-2. See <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366" title="Return codes. ">yh_rc</a> for other possible errors </dd></dl>

</div>
</div>
<a id="aa3f473e6dbb9188ad0269b40921c4f5f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa3f473e6dbb9188ad0269b40921c4f5f">&#9670;&nbsp;</a></span>yh_util_export_wrapped()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a> yh_util_export_wrapped </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="yubihsm_8h.html#aa3420d8ccc1fb0b0dee1af5a53cc79de">yh_session</a> *&#160;</td>
          <td class="paramname"><em>session</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t&#160;</td>
          <td class="paramname"><em>wrapping_key_id</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="yubihsm_8h.html#a2fe39512cb4df34b270a67dbb8e13583">yh_object_type</a>&#160;</td>
          <td class="paramname"><em>target_type</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t&#160;</td>
          <td class="paramname"><em>target_id</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t *&#160;</td>
          <td class="paramname"><em>out</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t *&#160;</td>
          <td class="paramname"><em>out_len</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Export an object under wrap from the device. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">session</td><td>Authenticated session to use </td></tr>
    <tr><td class="paramname">wrapping_key_id</td><td>Object ID of the Wrap Key to use to wrap the object </td></tr>
    <tr><td class="paramname">target_type</td><td>Type of the object to be exported. See <a class="el" href="yubihsm_8h.html#a2fe39512cb4df34b270a67dbb8e13583" title="Object types. ">yh_object_type</a> </td></tr>
    <tr><td class="paramname">target_id</td><td>Object ID of the object to be exported </td></tr>
    <tr><td class="paramname">out</td><td>Wrapped data </td></tr>
    <tr><td class="paramname">out_len</td><td>Length of wrapped data</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a405155512dc2284dc210ed15be1d0815" title="Returned value when function was successful. ">YHR_SUCCESS</a> if successful. <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a731b3992b45fde61b6760d92de4dbbf5" title="Returned value when an argument to a function is invalid. ">YHR_INVALID_PARAMETERS</a> if input parameters are NULL. See <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366" title="Return codes. ">yh_rc</a> for other possible errors </dd></dl>

</div>
</div>
<a id="a2db9bbd57a908c5c454fc6254f57dcff"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2db9bbd57a908c5c454fc6254f57dcff">&#9670;&nbsp;</a></span>yh_util_generate_ec_key()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a> yh_util_generate_ec_key </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="yubihsm_8h.html#aa3420d8ccc1fb0b0dee1af5a53cc79de">yh_session</a> *&#160;</td>
          <td class="paramname"><em>session</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t *&#160;</td>
          <td class="paramname"><em>key_id</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>label</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t&#160;</td>
          <td class="paramname"><em>domains</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structyh__capabilities.html">yh_capabilities</a> *&#160;</td>
          <td class="paramname"><em>capabilities</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55ca">yh_algorithm</a>&#160;</td>
          <td class="paramname"><em>algorithm</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Generate an Elliptic Curve key in the device. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">session</td><td>Authenticated session to use </td></tr>
    <tr><td class="paramname">key_id</td><td>Object ID of the key. 0 if the Object ID should be generated by the device </td></tr>
    <tr><td class="paramname">label</td><td>Label of the key. Maximum length is <a class="el" href="yubihsm_8h.html#a431f8b753552a8b2f5f980e871b6d019" title="Max length of object labels. ">YH_OBJ_LABEL_LEN</a> </td></tr>
    <tr><td class="paramname">domains</td><td>Domains to which the key belongs. See <a class="el" href="yubihsm_8h.html#a96a4c751a281515d5610adb8fd779438" title="Convert a string to a domain&#39;s numeric value. ">yh_string_to_domains()</a> </td></tr>
    <tr><td class="paramname">capabilities</td><td>Capabilities of the key. See <a class="el" href="yubihsm_8h.html#aab440e1cb671d9ba7a2e7d1243960e42" title="Convert capability string to byte array. ">yh_string_to_capabilities()</a> </td></tr>
    <tr><td class="paramname">algorithm</td><td>Algorithm to use to generate the EC key. Supported algorithm: <a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55caaedcbc07d82b18ca5c21eb3379a6cc010" title="ecp224 ">YH_ALGO_EC_P224</a>, <a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55caae4b191baf5c65f9234120080264d129b" title="ecp256 ">YH_ALGO_EC_P256</a>, <a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55caad423056b13955068935dc8b3ac0e65d1" title="eck256 ">YH_ALGO_EC_K256</a>, <a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55caabd995726d45b6dd2388775db4767c80d" title="ecbp256 ">YH_ALGO_EC_BP256</a>, <a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55caa31094c17c66e4c365ca3dad353bc8bda" title="ecp384 ">YH_ALGO_EC_P384</a>, <a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55caa228fd3332b55c60438dfea6a1b09af36" title="ecbp384 ">YH_ALGO_EC_BP384</a>, <a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55caab9c1be17b7b3f755346ff8c3cca3ed25" title="ecbp512 ">YH_ALGO_EC_BP512</a> and <a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55caa05aec903fd67851f968aaa606fe2138a" title="ecp521 ">YH_ALGO_EC_P521</a>.</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a405155512dc2284dc210ed15be1d0815" title="Returned value when function was successful. ">YHR_SUCCESS</a> if successful. <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a731b3992b45fde61b6760d92de4dbbf5" title="Returned value when an argument to a function is invalid. ">YHR_INVALID_PARAMETERS</a> input parameters are NULL or the algorithm is not one of <a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55caaedcbc07d82b18ca5c21eb3379a6cc010" title="ecp224 ">YH_ALGO_EC_P224</a>, <a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55caae4b191baf5c65f9234120080264d129b" title="ecp256 ">YH_ALGO_EC_P256</a>, <a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55caad423056b13955068935dc8b3ac0e65d1" title="eck256 ">YH_ALGO_EC_K256</a>, <a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55caabd995726d45b6dd2388775db4767c80d" title="ecbp256 ">YH_ALGO_EC_BP256</a>, <a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55caa31094c17c66e4c365ca3dad353bc8bda" title="ecp384 ">YH_ALGO_EC_P384</a>, <a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55caa228fd3332b55c60438dfea6a1b09af36" title="ecbp384 ">YH_ALGO_EC_BP384</a>, <a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55caab9c1be17b7b3f755346ff8c3cca3ed25" title="ecbp512 ">YH_ALGO_EC_BP512</a> or <a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55caa05aec903fd67851f968aaa606fe2138a" title="ecp521 ">YH_ALGO_EC_P521</a>. See <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366" title="Return codes. ">yh_rc</a> for other possible errors </dd></dl>

</div>
</div>
<a id="a41f4326fe736e99302442d6a6109edbc"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a41f4326fe736e99302442d6a6109edbc">&#9670;&nbsp;</a></span>yh_util_generate_ed_key()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a> yh_util_generate_ed_key </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="yubihsm_8h.html#aa3420d8ccc1fb0b0dee1af5a53cc79de">yh_session</a> *&#160;</td>
          <td class="paramname"><em>session</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t *&#160;</td>
          <td class="paramname"><em>key_id</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>label</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t&#160;</td>
          <td class="paramname"><em>domains</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structyh__capabilities.html">yh_capabilities</a> *&#160;</td>
          <td class="paramname"><em>capabilities</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55ca">yh_algorithm</a>&#160;</td>
          <td class="paramname"><em>algorithm</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Generate an ED key in the device. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">session</td><td>Authenticated session to use </td></tr>
    <tr><td class="paramname">key_id</td><td>Object ID of the key. 0 if the Object ID should be generated by the device </td></tr>
    <tr><td class="paramname">label</td><td>Label for the key. Maximum length <a class="el" href="yubihsm_8h.html#a431f8b753552a8b2f5f980e871b6d019" title="Max length of object labels. ">YH_OBJ_LABEL_LEN</a> </td></tr>
    <tr><td class="paramname">domains</td><td>Domains to which the key belongs. See <a class="el" href="yubihsm_8h.html#a96a4c751a281515d5610adb8fd779438" title="Convert a string to a domain&#39;s numeric value. ">yh_string_to_domains()</a> </td></tr>
    <tr><td class="paramname">capabilities</td><td>Capabilities of the ED key. See <a class="el" href="yubihsm_8h.html#aab440e1cb671d9ba7a2e7d1243960e42" title="Convert capability string to byte array. ">yh_string_to_capabilities()</a> </td></tr>
    <tr><td class="paramname">algorithm</td><td>Algorithm to use to generate the ED key. Supported algorithm: <a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55caa68c2c97f16c36f727e41a899d8a7e8bd" title="ed25519 ">YH_ALGO_EC_ED25519</a></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a405155512dc2284dc210ed15be1d0815" title="Returned value when function was successful. ">YHR_SUCCESS</a> if successful. <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a731b3992b45fde61b6760d92de4dbbf5" title="Returned value when an argument to a function is invalid. ">YHR_INVALID_PARAMETERS</a> input parameters are NULL or the algorithm is not <a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55caa68c2c97f16c36f727e41a899d8a7e8bd" title="ed25519 ">YH_ALGO_EC_ED25519</a>. See <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366" title="Return codes. ">yh_rc</a> for other possible errors </dd></dl>

</div>
</div>
<a id="a1eac22853548b7ceab92550c22233b18"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1eac22853548b7ceab92550c22233b18">&#9670;&nbsp;</a></span>yh_util_generate_hmac_key()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a> yh_util_generate_hmac_key </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="yubihsm_8h.html#aa3420d8ccc1fb0b0dee1af5a53cc79de">yh_session</a> *&#160;</td>
          <td class="paramname"><em>session</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t *&#160;</td>
          <td class="paramname"><em>key_id</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>label</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t&#160;</td>
          <td class="paramname"><em>domains</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structyh__capabilities.html">yh_capabilities</a> *&#160;</td>
          <td class="paramname"><em>capabilities</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55ca">yh_algorithm</a>&#160;</td>
          <td class="paramname"><em>algorithm</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Generate an HMAC key in the device. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">session</td><td>Authenticated session to use </td></tr>
    <tr><td class="paramname">key_id</td><td>Object ID of the key. 0 if the Object ID should be generated by the device </td></tr>
    <tr><td class="paramname">label</td><td>Label of the key. Maximum length <a class="el" href="yubihsm_8h.html#a431f8b753552a8b2f5f980e871b6d019" title="Max length of object labels. ">YH_OBJ_LABEL_LEN</a> </td></tr>
    <tr><td class="paramname">domains</td><td>Domains to which the key belongs. See <a class="el" href="yubihsm_8h.html#a96a4c751a281515d5610adb8fd779438" title="Convert a string to a domain&#39;s numeric value. ">yh_string_to_domains()</a> </td></tr>
    <tr><td class="paramname">capabilities</td><td>Capabilities of the key. See <a class="el" href="yubihsm_8h.html#aab440e1cb671d9ba7a2e7d1243960e42" title="Convert capability string to byte array. ">yh_string_to_capabilities()</a> </td></tr>
    <tr><td class="paramname">algorithm</td><td>Algorithm to use to generate the HMAC key. Supported algorithims: <a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55caa942e65c8cd0034eebe9a20c2297c7b06" title="hmac-sha1 ">YH_ALGO_HMAC_SHA1</a>, <a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55caab0a0e1eb424b61057f159f1e53311f5c" title="hmac-sha256 ">YH_ALGO_HMAC_SHA256</a>, <a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55caa781e7ca62563917d2129bde8ec53401b" title="hmac-sha384 ">YH_ALGO_HMAC_SHA384</a> and <a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55caa72d6c7ea77f10e39bbadc8b58d55b9ec" title="hmac-sha512 ">YH_ALGO_HMAC_SHA512</a></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a405155512dc2284dc210ed15be1d0815" title="Returned value when function was successful. ">YHR_SUCCESS</a> if successful. <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a731b3992b45fde61b6760d92de4dbbf5" title="Returned value when an argument to a function is invalid. ">YHR_INVALID_PARAMETERS</a> input parameters are NULL. See <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366" title="Return codes. ">yh_rc</a> for other possible errors </dd></dl>

</div>
</div>
<a id="a9e130d225a8dc003d7a7c0ce4b8ea5e4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9e130d225a8dc003d7a7c0ce4b8ea5e4">&#9670;&nbsp;</a></span>yh_util_generate_otp_aead_key()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a> yh_util_generate_otp_aead_key </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="yubihsm_8h.html#aa3420d8ccc1fb0b0dee1af5a53cc79de">yh_session</a> *&#160;</td>
          <td class="paramname"><em>session</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t *&#160;</td>
          <td class="paramname"><em>key_id</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>label</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t&#160;</td>
          <td class="paramname"><em>domains</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structyh__capabilities.html">yh_capabilities</a> *&#160;</td>
          <td class="paramname"><em>capabilities</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55ca">yh_algorithm</a>&#160;</td>
          <td class="paramname"><em>algorithm</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>nonce_id</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Generate an <a class="el" href="yubihsm_8h.html#a2fe39512cb4df34b270a67dbb8e13583a02c5f683fde147de6a9e1043f971f5f0" title="OTP AEAD Key is a secret key used to decrypt Yubico OTP values. ">YH_OTP_AEAD_KEY</a> for Yubico OTP decryption in the device. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">session</td><td>Authenticated session to use </td></tr>
    <tr><td class="paramname">key_id</td><td>Object ID of the AEAD Key. 0 if the Object ID should be generated by the device </td></tr>
    <tr><td class="paramname">label</td><td>Label of the AEAD Key. Maximum length is <a class="el" href="yubihsm_8h.html#a431f8b753552a8b2f5f980e871b6d019" title="Max length of object labels. ">YH_OBJ_LABEL_LEN</a> </td></tr>
    <tr><td class="paramname">domains</td><td>Domains the AEAD Key will be operating within. See <a class="el" href="yubihsm_8h.html#a96a4c751a281515d5610adb8fd779438" title="Convert a string to a domain&#39;s numeric value. ">yh_string_to_domains()</a> </td></tr>
    <tr><td class="paramname">capabilities</td><td>Capabilities of the AEAD Key. See <a class="el" href="yubihsm_8h.html#aab440e1cb671d9ba7a2e7d1243960e42" title="Convert capability string to byte array. ">yh_string_to_capabilities()</a> </td></tr>
    <tr><td class="paramname">algorithm</td><td>Algorithm used to generate the AEAD Key. Supported algorithms: <a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55caa62e7ba4126ae16faeafb28972a4e0959" title="aes128-yubico-otp ">YH_ALGO_AES128_YUBICO_OTP</a>, <a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55caa62dd31db747b4b7f81d9e30877a0b720" title="aes192-yubico-otp ">YH_ALGO_AES192_YUBICO_OTP</a> and <a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55caad1558532867577d1d77c84f1ae632acd" title="aes256-yubico-otp ">YH_ALGO_AES256_YUBICO_OTP</a> </td></tr>
    <tr><td class="paramname">nonce_id</td><td>Nonce ID</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a405155512dc2284dc210ed15be1d0815" title="Returned value when function was successful. ">YHR_SUCCESS</a> if successful. <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a731b3992b45fde61b6760d92de4dbbf5" title="Returned value when an argument to a function is invalid. ">YHR_INVALID_PARAMETERS</a> if input parameters are NULL. See <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366" title="Return codes. ">yh_rc</a> for other possible errors </dd></dl>

</div>
</div>
<a id="ab1c62ef2643184a8ad44c569c87712d1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab1c62ef2643184a8ad44c569c87712d1">&#9670;&nbsp;</a></span>yh_util_generate_rsa_key()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a> yh_util_generate_rsa_key </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="yubihsm_8h.html#aa3420d8ccc1fb0b0dee1af5a53cc79de">yh_session</a> *&#160;</td>
          <td class="paramname"><em>session</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t *&#160;</td>
          <td class="paramname"><em>key_id</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>label</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t&#160;</td>
          <td class="paramname"><em>domains</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structyh__capabilities.html">yh_capabilities</a> *&#160;</td>
          <td class="paramname"><em>capabilities</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55ca">yh_algorithm</a>&#160;</td>
          <td class="paramname"><em>algorithm</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Generate an RSA key in the device. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">session</td><td>Authenticated session to use </td></tr>
    <tr><td class="paramname">key_id</td><td>Object ID of the key. 0 if the Object ID should be generated by the device </td></tr>
    <tr><td class="paramname">label</td><td>Label of the key. Maximum length is <a class="el" href="yubihsm_8h.html#a431f8b753552a8b2f5f980e871b6d019" title="Max length of object labels. ">YH_OBJ_LABEL_LEN</a> </td></tr>
    <tr><td class="paramname">domains</td><td>Domains to which the key belongs. See <a class="el" href="yubihsm_8h.html#a96a4c751a281515d5610adb8fd779438" title="Convert a string to a domain&#39;s numeric value. ">yh_string_to_domains()</a> </td></tr>
    <tr><td class="paramname">capabilities</td><td>Capabilities of the key. See <a class="el" href="yubihsm_8h.html#aab440e1cb671d9ba7a2e7d1243960e42" title="Convert capability string to byte array. ">yh_string_to_capabilities()</a> </td></tr>
    <tr><td class="paramname">algorithm</td><td>Algorithm to use to generate the RSA key. Supported algorithms: <a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55caaafe94e6a770edb51c6db84f77d98d2c6" title="rsa2048 ">YH_ALGO_RSA_2048</a>, <a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55caafd3fbd9ed86caf267ccc77cb24d44426" title="rsa3072 ">YH_ALGO_RSA_3072</a> and <a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55caae5963322a0a0f43a1b74faa78e3a7329" title="rsa4096 ">YH_ALGO_RSA_4096</a></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a405155512dc2284dc210ed15be1d0815" title="Returned value when function was successful. ">YHR_SUCCESS</a> if successful. <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a731b3992b45fde61b6760d92de4dbbf5" title="Returned value when an argument to a function is invalid. ">YHR_INVALID_PARAMETERS</a> input parameters are NULL or the algorithm is not one of <a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55caaafe94e6a770edb51c6db84f77d98d2c6" title="rsa2048 ">YH_ALGO_RSA_2048</a>, <a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55caafd3fbd9ed86caf267ccc77cb24d44426" title="rsa3072 ">YH_ALGO_RSA_3072</a> or <a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55caae5963322a0a0f43a1b74faa78e3a7329" title="rsa4096 ">YH_ALGO_RSA_4096</a>. See <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366" title="Return codes. ">yh_rc</a> for other possible errors </dd></dl>

</div>
</div>
<a id="a1f749a696792e7911844629e056d9c15"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1f749a696792e7911844629e056d9c15">&#9670;&nbsp;</a></span>yh_util_generate_wrap_key()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a> yh_util_generate_wrap_key </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="yubihsm_8h.html#aa3420d8ccc1fb0b0dee1af5a53cc79de">yh_session</a> *&#160;</td>
          <td class="paramname"><em>session</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t *&#160;</td>
          <td class="paramname"><em>key_id</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>label</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t&#160;</td>
          <td class="paramname"><em>domains</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structyh__capabilities.html">yh_capabilities</a> *&#160;</td>
          <td class="paramname"><em>capabilities</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55ca">yh_algorithm</a>&#160;</td>
          <td class="paramname"><em>algorithm</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structyh__capabilities.html">yh_capabilities</a> *&#160;</td>
          <td class="paramname"><em>delegated_capabilities</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Generate a Wrap Key that can be used for export, import, wrap data and unwrap data in the device. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">session</td><td>Authenticated session to use </td></tr>
    <tr><td class="paramname">key_id</td><td>Object ID of the Wrap Key. 0 if the Object ID should be generated by the device </td></tr>
    <tr><td class="paramname">label</td><td>Label of the Wrap Key. Maximum length <a class="el" href="yubihsm_8h.html#a431f8b753552a8b2f5f980e871b6d019" title="Max length of object labels. ">YH_OBJ_LABEL_LEN</a> </td></tr>
    <tr><td class="paramname">domains</td><td>Domains where the Wrap Key will be operating within. See <a class="el" href="yubihsm_8h.html#a96a4c751a281515d5610adb8fd779438" title="Convert a string to a domain&#39;s numeric value. ">yh_string_to_domains()</a> </td></tr>
    <tr><td class="paramname">capabilities</td><td>Capabilities of the Wrap Key. See <a class="el" href="yubihsm_8h.html#aab440e1cb671d9ba7a2e7d1243960e42" title="Convert capability string to byte array. ">yh_string_to_capabilities()</a> </td></tr>
    <tr><td class="paramname">algorithm</td><td>Algorithm used to generate the Wrap Key </td></tr>
    <tr><td class="paramname">delegated_capabilities</td><td>Delegated capabilitites of the Wrap Key. See <a class="el" href="yubihsm_8h.html#aab440e1cb671d9ba7a2e7d1243960e42" title="Convert capability string to byte array. ">yh_string_to_capabilities()</a></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a405155512dc2284dc210ed15be1d0815" title="Returned value when function was successful. ">YHR_SUCCESS</a> if successful. <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a731b3992b45fde61b6760d92de4dbbf5" title="Returned value when an argument to a function is invalid. ">YHR_INVALID_PARAMETERS</a> if input parameters are NULL. See <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366" title="Return codes. ">yh_rc</a> for other possible errors</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="yubihsm_8h.html#a2fe39512cb4df34b270a67dbb8e13583" title="Object types. ">yh_object_type</a> </dd></dl>

</div>
</div>
<a id="a6ab558e1426359cc78e7a362f8b3acd9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6ab558e1426359cc78e7a362f8b3acd9">&#9670;&nbsp;</a></span>yh_util_get_device_info()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a> yh_util_get_device_info </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="yubihsm_8h.html#a114f98fee4b67eadd9b89b675632c710">yh_connector</a> *&#160;</td>
          <td class="paramname"><em>connector</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t *&#160;</td>
          <td class="paramname"><em>major</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t *&#160;</td>
          <td class="paramname"><em>minor</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t *&#160;</td>
          <td class="paramname"><em>patch</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t *&#160;</td>
          <td class="paramname"><em>serial</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t *&#160;</td>
          <td class="paramname"><em>log_total</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t *&#160;</td>
          <td class="paramname"><em>log_used</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55ca">yh_algorithm</a> *&#160;</td>
          <td class="paramname"><em>algorithms</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t *&#160;</td>
          <td class="paramname"><em>n_algorithms</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get device version, device serial number, supported algorithms and available log entries. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">connector</td><td>Connector to the device </td></tr>
    <tr><td class="paramname">major</td><td>Device major version number </td></tr>
    <tr><td class="paramname">minor</td><td>Device minor version number </td></tr>
    <tr><td class="paramname">patch</td><td>Device build version number </td></tr>
    <tr><td class="paramname">serial</td><td>Device serial number </td></tr>
    <tr><td class="paramname">log_total</td><td>Total number of log entries </td></tr>
    <tr><td class="paramname">log_used</td><td>Number of written log entries </td></tr>
    <tr><td class="paramname">algorithms</td><td>List of supported algorithms </td></tr>
    <tr><td class="paramname">n_algorithms</td><td>Number of supported algorithms</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a405155512dc2284dc210ed15be1d0815" title="Returned value when function was successful. ">YHR_SUCCESS</a> if successful. <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a731b3992b45fde61b6760d92de4dbbf5" title="Returned value when an argument to a function is invalid. ">YHR_INVALID_PARAMETERS</a> if the connector is NULL. <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366ad8971a0b9647564b76b3f4e4b662c965" title="Returned value when there is not enough space to store data. ">YHR_BUFFER_TOO_SMALL</a> if n_algorithms is smaller than the number of actually supported algorithms. See <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366" title="Return codes. ">yh_rc</a> for other possible errors.</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a href="https://developers.yubico.com/YubiHSM2/Concepts/Algorithms.html">Algorithms</a> </dd></dl>

</div>
</div>
<a id="a5ae52ad56b7e83baeb33b46104263aa6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5ae52ad56b7e83baeb33b46104263aa6">&#9670;&nbsp;</a></span>yh_util_get_log_entries()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a> yh_util_get_log_entries </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="yubihsm_8h.html#aa3420d8ccc1fb0b0dee1af5a53cc79de">yh_session</a> *&#160;</td>
          <td class="paramname"><em>session</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t *&#160;</td>
          <td class="paramname"><em>unlogged_boot</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t *&#160;</td>
          <td class="paramname"><em>unlogged_auth</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structyh__log__entry.html">yh_log_entry</a> *&#160;</td>
          <td class="paramname"><em>out</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t *&#160;</td>
          <td class="paramname"><em>n_items</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get audit logs from the device. </p>
<p>When audit enforce is set, if the log buffer is full, no new operations (other than authentication operations) can be performed unless the log entries are read by this command and then the log index is set by calling <a class="el" href="yubihsm_8h.html#a9d844855c9066bbea0e4344978dd7fdc" title="Set the index of the last extracted log entry. ">yh_util_set_log_index()</a>.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">session</td><td>Authenticated session to use </td></tr>
    <tr><td class="paramname">unlogged_boot</td><td>Number of unlogged boot events. Used if the log buffer is full and audit enforce is set </td></tr>
    <tr><td class="paramname">unlogged_auth</td><td>Number of unlogged authentication events. Used if the log buffer is full and audit enforce is set </td></tr>
    <tr><td class="paramname">out</td><td>Log entries on the device </td></tr>
    <tr><td class="paramname">n_items</td><td>Number of log entries</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a405155512dc2284dc210ed15be1d0815" title="Returned value when function was successful. ">YHR_SUCCESS</a> if successful. <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a731b3992b45fde61b6760d92de4dbbf5" title="Returned value when an argument to a function is invalid. ">YHR_INVALID_PARAMETERS</a> if input parameters are NULL. <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366ad8971a0b9647564b76b3f4e4b662c965" title="Returned value when there is not enough space to store data. ">YHR_BUFFER_TOO_SMALL</a> if <code>n_items</code> is smaller than the actual number of retrieved log entries. See <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366" title="Return codes. ">yh_rc</a> for other possible errors </dd></dl>

</div>
</div>
<a id="a7b5f1f0c1cbca11fbe21e7e4e6b29a1b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7b5f1f0c1cbca11fbe21e7e4e6b29a1b">&#9670;&nbsp;</a></span>yh_util_get_object_info()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a> yh_util_get_object_info </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="yubihsm_8h.html#aa3420d8ccc1fb0b0dee1af5a53cc79de">yh_session</a> *&#160;</td>
          <td class="paramname"><em>session</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t&#160;</td>
          <td class="paramname"><em>id</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="yubihsm_8h.html#a2fe39512cb4df34b270a67dbb8e13583">yh_object_type</a>&#160;</td>
          <td class="paramname"><em>type</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structyh__object__descriptor.html">yh_object_descriptor</a> *&#160;</td>
          <td class="paramname"><em>object</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get metadata of the object with the specified Object ID and Type. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">session</td><td>Authenticated session to use </td></tr>
    <tr><td class="paramname">id</td><td>Object ID of the object to get </td></tr>
    <tr><td class="paramname">type</td><td>Object type. See <a class="el" href="yubihsm_8h.html#a2fe39512cb4df34b270a67dbb8e13583" title="Object types. ">yh_object_type</a> </td></tr>
    <tr><td class="paramname">object</td><td>Object information</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a405155512dc2284dc210ed15be1d0815" title="Returned value when function was successful. ">YHR_SUCCESS</a> if successful. <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a731b3992b45fde61b6760d92de4dbbf5" title="Returned value when an argument to a function is invalid. ">YHR_INVALID_PARAMETERS</a> if the session is NULL. See <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366" title="Return codes. ">yh_rc</a> for other possible errors.</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a href="https://developers.yubico.com/YubiHSM2/Concepts/Object.html">Objects</a> </dd></dl>

</div>
</div>
<a id="a56e060e71fb8baa0531b3a20848abf37"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a56e060e71fb8baa0531b3a20848abf37">&#9670;&nbsp;</a></span>yh_util_get_opaque()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a> yh_util_get_opaque </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="yubihsm_8h.html#aa3420d8ccc1fb0b0dee1af5a53cc79de">yh_session</a> *&#160;</td>
          <td class="paramname"><em>session</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t&#160;</td>
          <td class="paramname"><em>object_id</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t *&#160;</td>
          <td class="paramname"><em>out</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t *&#160;</td>
          <td class="paramname"><em>out_len</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get an <a class="el" href="yubihsm_8h.html#a2fe39512cb4df34b270a67dbb8e13583a5d37b7418d50b420621e6a6eb2700de4" title="Opaque Object is an unchecked kind of Object, normally used to store raw data in the device...">YH_OPAQUE</a> object (like an X.509 certificate) from the device. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">session</td><td>Authenticated session to use </td></tr>
    <tr><td class="paramname">object_id</td><td>Object ID of the Opaque object </td></tr>
    <tr><td class="paramname">out</td><td>the retrieved Opaque object </td></tr>
    <tr><td class="paramname">out_len</td><td>Length of the retrieved Opaque object</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a405155512dc2284dc210ed15be1d0815" title="Returned value when function was successful. ">YHR_SUCCESS</a> if successful. <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a731b3992b45fde61b6760d92de4dbbf5" title="Returned value when an argument to a function is invalid. ">YHR_INVALID_PARAMETERS</a> if input parameters are NULL. See <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366" title="Return codes. ">yh_rc</a> for other possible errors </dd></dl>

</div>
</div>
<a id="a11871e03c808e2d25737f893e58ed094"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a11871e03c808e2d25737f893e58ed094">&#9670;&nbsp;</a></span>yh_util_get_option()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a> yh_util_get_option </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="yubihsm_8h.html#aa3420d8ccc1fb0b0dee1af5a53cc79de">yh_session</a> *&#160;</td>
          <td class="paramname"><em>session</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="yubihsm_8h.html#acc8090ce0ec5029b376803e44b1cb4aa">yh_option</a>&#160;</td>
          <td class="paramname"><em>option</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t *&#160;</td>
          <td class="paramname"><em>out</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t *&#160;</td>
          <td class="paramname"><em>out_len</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get a device-global option. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">session</td><td>Authenticated session to use </td></tr>
    <tr><td class="paramname">option</td><td>Option to get. See <a class="el" href="yubihsm_8h.html#acc8090ce0ec5029b376803e44b1cb4aa" title="Global options. ">yh_option</a> </td></tr>
    <tr><td class="paramname">out</td><td>Option value </td></tr>
    <tr><td class="paramname">out_len</td><td>Length of option value</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a405155512dc2284dc210ed15be1d0815" title="Returned value when function was successful. ">YHR_SUCCESS</a> if successful. <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a731b3992b45fde61b6760d92de4dbbf5" title="Returned value when an argument to a function is invalid. ">YHR_INVALID_PARAMETERS</a> if input parameters are NULL. See <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366" title="Return codes. ">yh_rc</a> for other possible errors </dd></dl>

</div>
</div>
<a id="af1bc8ed34687d83701eb3cc673ad4b96"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af1bc8ed34687d83701eb3cc673ad4b96">&#9670;&nbsp;</a></span>yh_util_get_pseudo_random()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a> yh_util_get_pseudo_random </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="yubihsm_8h.html#aa3420d8ccc1fb0b0dee1af5a53cc79de">yh_session</a> *&#160;</td>
          <td class="paramname"><em>session</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>len</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t *&#160;</td>
          <td class="paramname"><em>out</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t *&#160;</td>
          <td class="paramname"><em>out_len</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get a fixed number of pseudo-random bytes from the device. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">session</td><td>Authenticated session to use </td></tr>
    <tr><td class="paramname">len</td><td>Length of pseudo-random data to get </td></tr>
    <tr><td class="paramname">out</td><td>Pseudo-random data out </td></tr>
    <tr><td class="paramname">out_len</td><td>Length of pseudo-random data</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a405155512dc2284dc210ed15be1d0815" title="Returned value when function was successful. ">YHR_SUCCESS</a> if successful. <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a731b3992b45fde61b6760d92de4dbbf5" title="Returned value when an argument to a function is invalid. ">YHR_INVALID_PARAMETERS</a> input parameters are NULL. See <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366" title="Return codes. ">yh_rc</a> for other possible errors </dd></dl>

</div>
</div>
<a id="aa7b8b42156c4bdaf41d8b9758a2fd73f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa7b8b42156c4bdaf41d8b9758a2fd73f">&#9670;&nbsp;</a></span>yh_util_get_public_key()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a> yh_util_get_public_key </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="yubihsm_8h.html#aa3420d8ccc1fb0b0dee1af5a53cc79de">yh_session</a> *&#160;</td>
          <td class="paramname"><em>session</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t&#160;</td>
          <td class="paramname"><em>id</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t *&#160;</td>
          <td class="paramname"><em>data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t *&#160;</td>
          <td class="paramname"><em>data_len</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55ca">yh_algorithm</a> *&#160;</td>
          <td class="paramname"><em>algorithm</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get the value of the public key with the specified Object ID. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">session</td><td>Authenticated session to use </td></tr>
    <tr><td class="paramname">id</td><td>Object ID of the public key </td></tr>
    <tr><td class="paramname">data</td><td>Value of the public key </td></tr>
    <tr><td class="paramname">data_len</td><td>Length of the public key in bytes </td></tr>
    <tr><td class="paramname">algorithm</td><td>Algorithm of the key</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a405155512dc2284dc210ed15be1d0815" title="Returned value when function was successful. ">YHR_SUCCESS</a> if successful. <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a731b3992b45fde61b6760d92de4dbbf5" title="Returned value when an argument to a function is invalid. ">YHR_INVALID_PARAMETERS</a> if input parameters are NULL. <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366ad8971a0b9647564b76b3f4e4b662c965" title="Returned value when there is not enough space to store data. ">YHR_BUFFER_TOO_SMALL</a> if the actual key length was bigger than data_len. See <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366" title="Return codes. ">yh_rc</a> for other possible errors </dd></dl>

</div>
</div>
<a id="ae87d5578703775b9d4151a14435f4a73"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae87d5578703775b9d4151a14435f4a73">&#9670;&nbsp;</a></span>yh_util_get_storage_info()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a> yh_util_get_storage_info </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="yubihsm_8h.html#aa3420d8ccc1fb0b0dee1af5a53cc79de">yh_session</a> *&#160;</td>
          <td class="paramname"><em>session</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t *&#160;</td>
          <td class="paramname"><em>total_records</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t *&#160;</td>
          <td class="paramname"><em>free_records</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t *&#160;</td>
          <td class="paramname"><em>total_pages</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t *&#160;</td>
          <td class="paramname"><em>free_pages</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t *&#160;</td>
          <td class="paramname"><em>page_size</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Report currently free storage. </p>
<p>This is reported as free records, free pages and page size.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">session</td><td>Authenticated session to use </td></tr>
    <tr><td class="paramname">total_records</td><td>Total number of records </td></tr>
    <tr><td class="paramname">free_records</td><td>Number of free records </td></tr>
    <tr><td class="paramname">total_pages</td><td>Total number of pages </td></tr>
    <tr><td class="paramname">free_pages</td><td>Number of free pages </td></tr>
    <tr><td class="paramname">page_size</td><td>Page size in bytes</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a405155512dc2284dc210ed15be1d0815" title="Returned value when function was successful. ">YHR_SUCCESS</a> if successful. <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a731b3992b45fde61b6760d92de4dbbf5" title="Returned value when an argument to a function is invalid. ">YHR_INVALID_PARAMETERS</a> if the session is NULL. See <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366" title="Return codes. ">yh_rc</a> for other possible errors </dd></dl>

</div>
</div>
<a id="a47768ae0e72beba49f02db1baddf4823"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a47768ae0e72beba49f02db1baddf4823">&#9670;&nbsp;</a></span>yh_util_get_template()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a> yh_util_get_template </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="yubihsm_8h.html#aa3420d8ccc1fb0b0dee1af5a53cc79de">yh_session</a> *&#160;</td>
          <td class="paramname"><em>session</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t&#160;</td>
          <td class="paramname"><em>object_id</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t *&#160;</td>
          <td class="paramname"><em>out</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t *&#160;</td>
          <td class="paramname"><em>out_len</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get a <a class="el" href="yubihsm_8h.html#a2fe39512cb4df34b270a67dbb8e13583a96244762de5ce4175e60157239e7a097" title="Template is a binary object used for example to validate SSH certificate requests. ">YH_TEMPLATE</a> object from the device. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">session</td><td>Authenticated session to use </td></tr>
    <tr><td class="paramname">object_id</td><td>Object ID of the Template to get </td></tr>
    <tr><td class="paramname">out</td><td>The retrieved Template </td></tr>
    <tr><td class="paramname">out_len</td><td>Length of the retrieved Template</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a405155512dc2284dc210ed15be1d0815" title="Returned value when function was successful. ">YHR_SUCCESS</a> if successful. <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a731b3992b45fde61b6760d92de4dbbf5" title="Returned value when an argument to a function is invalid. ">YHR_INVALID_PARAMETERS</a> if input parameters are NULL. See <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366" title="Return codes. ">yh_rc</a> for other possible errors </dd></dl>

</div>
</div>
<a id="ac154da7ac6dc0a7b4b3a6cdff9433da8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac154da7ac6dc0a7b4b3a6cdff9433da8">&#9670;&nbsp;</a></span>yh_util_import_authentication_key()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a> yh_util_import_authentication_key </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="yubihsm_8h.html#aa3420d8ccc1fb0b0dee1af5a53cc79de">yh_session</a> *&#160;</td>
          <td class="paramname"><em>session</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t *&#160;</td>
          <td class="paramname"><em>key_id</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>label</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t&#160;</td>
          <td class="paramname"><em>domains</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structyh__capabilities.html">yh_capabilities</a> *&#160;</td>
          <td class="paramname"><em>capabilities</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structyh__capabilities.html">yh_capabilities</a> *&#160;</td>
          <td class="paramname"><em>delegated_capabilities</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const uint8_t *&#160;</td>
          <td class="paramname"><em>key_enc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>key_enc_len</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const uint8_t *&#160;</td>
          <td class="paramname"><em>key_mac</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>key_mac_len</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Import an <a class="el" href="yubihsm_8h.html#a2fe39512cb4df34b270a67dbb8e13583acee44b775b3c5b6157f0732699935074" title="Authentication Key is used to establish Sessions with a device. ">YH_AUTHENTICATION_KEY</a> into the device. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">session</td><td>Authenticated session to use </td></tr>
    <tr><td class="paramname">key_id</td><td>Object ID of the imported key. 0 if the Object ID should be generated by the device </td></tr>
    <tr><td class="paramname">label</td><td>Label of the key. Maximum length is <a class="el" href="yubihsm_8h.html#a431f8b753552a8b2f5f980e871b6d019" title="Max length of object labels. ">YH_OBJ_LABEL_LEN</a> </td></tr>
    <tr><td class="paramname">domains</td><td>Domains to which the key belongs. See <a class="el" href="yubihsm_8h.html#a96a4c751a281515d5610adb8fd779438" title="Convert a string to a domain&#39;s numeric value. ">yh_string_to_domains()</a> </td></tr>
    <tr><td class="paramname">capabilities</td><td>Capabilities of the key. See <a class="el" href="yubihsm_8h.html#aab440e1cb671d9ba7a2e7d1243960e42" title="Convert capability string to byte array. ">yh_string_to_capabilities()</a> </td></tr>
    <tr><td class="paramname">delegated_capabilities</td><td>Delegated capabilities of the key. See <a class="el" href="yubihsm_8h.html#aab440e1cb671d9ba7a2e7d1243960e42" title="Convert capability string to byte array. ">yh_string_to_capabilities()</a> </td></tr>
    <tr><td class="paramname">key_enc</td><td>Long lived encryption key of the Authentication Key to import </td></tr>
    <tr><td class="paramname">key_enc_len</td><td>Length of the encryption key. Must be <a class="el" href="yubihsm_8h.html#ac2737b2a34c26d0258d25e34993df391" title="Length of authentication keys. ">YH_KEY_LEN</a> </td></tr>
    <tr><td class="paramname">key_mac</td><td>Long lived MAC key of the Authentication Key to import </td></tr>
    <tr><td class="paramname">key_mac_len</td><td>Length of the MAC key. Must be <a class="el" href="yubihsm_8h.html#ac2737b2a34c26d0258d25e34993df391" title="Length of authentication keys. ">YH_KEY_LEN</a></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a405155512dc2284dc210ed15be1d0815" title="Returned value when function was successful. ">YHR_SUCCESS</a> if successful. <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a731b3992b45fde61b6760d92de4dbbf5" title="Returned value when an argument to a function is invalid. ">YHR_INVALID_PARAMETERS</a> if input parameters are NULL or if <code>key_enc_len</code> or <code>key_mac_len</code> are not the expected values. See <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366" title="Return codes. ">yh_rc</a> for other possible errors</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a href="https://developers.yubico.com/YubiHSM2/Concepts/Object.html">Authentication Key</a> </dd></dl>

</div>
</div>
<a id="a80b4c4caeb9c768737c2dbf46d9352e4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a80b4c4caeb9c768737c2dbf46d9352e4">&#9670;&nbsp;</a></span>yh_util_import_authentication_key_derived()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a> yh_util_import_authentication_key_derived </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="yubihsm_8h.html#aa3420d8ccc1fb0b0dee1af5a53cc79de">yh_session</a> *&#160;</td>
          <td class="paramname"><em>session</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t *&#160;</td>
          <td class="paramname"><em>key_id</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>label</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t&#160;</td>
          <td class="paramname"><em>domains</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structyh__capabilities.html">yh_capabilities</a> *&#160;</td>
          <td class="paramname"><em>capabilities</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structyh__capabilities.html">yh_capabilities</a> *&#160;</td>
          <td class="paramname"><em>delegated_capabilities</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const uint8_t *&#160;</td>
          <td class="paramname"><em>password</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>password_len</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Import an <a class="el" href="yubihsm_8h.html#a2fe39512cb4df34b270a67dbb8e13583acee44b775b3c5b6157f0732699935074" title="Authentication Key is used to establish Sessions with a device. ">YH_AUTHENTICATION_KEY</a> with long lived keys derived from a password. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">session</td><td>Authenticated session to use </td></tr>
    <tr><td class="paramname">key_id</td><td>Object ID of the key. 0 if the Object ID should be generated by the device </td></tr>
    <tr><td class="paramname">label</td><td>Label of the key. Maximum length is <a class="el" href="yubihsm_8h.html#a431f8b753552a8b2f5f980e871b6d019" title="Max length of object labels. ">YH_OBJ_LABEL_LEN</a> </td></tr>
    <tr><td class="paramname">domains</td><td>Domains to which the key belongs. See <a class="el" href="yubihsm_8h.html#a96a4c751a281515d5610adb8fd779438" title="Convert a string to a domain&#39;s numeric value. ">yh_string_to_domains()</a> </td></tr>
    <tr><td class="paramname">capabilities</td><td>Capabilities of the key. See <a class="el" href="yubihsm_8h.html#aab440e1cb671d9ba7a2e7d1243960e42" title="Convert capability string to byte array. ">yh_string_to_capabilities()</a> </td></tr>
    <tr><td class="paramname">delegated_capabilities</td><td>Delegated capabilities of the key. See <a class="el" href="yubihsm_8h.html#aab440e1cb671d9ba7a2e7d1243960e42" title="Convert capability string to byte array. ">yh_string_to_capabilities()</a> </td></tr>
    <tr><td class="paramname">password</td><td>Password used to derive the long lived encryption key and MAC key of the Athentication Key </td></tr>
    <tr><td class="paramname">password_len</td><td>Length of password</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a405155512dc2284dc210ed15be1d0815" title="Returned value when function was successful. ">YHR_SUCCESS</a> if successful. <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a731b3992b45fde61b6760d92de4dbbf5" title="Returned value when an argument to a function is invalid. ">YHR_INVALID_PARAMETERS</a> if input parameters are NULL. See <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366" title="Return codes. ">yh_rc</a> for other possible errors </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a href="https://developers.yubico.com/YubiHSM2/Concepts/Object.html">Authentication Key</a> </dd></dl>

</div>
</div>
<a id="adc142d8f397eee024b3c145fa8abad85"></a>
<h2 class="memtitle"><span class="permalink"><a href="#adc142d8f397eee024b3c145fa8abad85">&#9670;&nbsp;</a></span>yh_util_import_ec_key()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a> yh_util_import_ec_key </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="yubihsm_8h.html#aa3420d8ccc1fb0b0dee1af5a53cc79de">yh_session</a> *&#160;</td>
          <td class="paramname"><em>session</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t *&#160;</td>
          <td class="paramname"><em>key_id</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>label</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t&#160;</td>
          <td class="paramname"><em>domains</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structyh__capabilities.html">yh_capabilities</a> *&#160;</td>
          <td class="paramname"><em>capabilities</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55ca">yh_algorithm</a>&#160;</td>
          <td class="paramname"><em>algorithm</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const uint8_t *&#160;</td>
          <td class="paramname"><em>s</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Import an Elliptic Curve key into the device. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">session</td><td>Authenticated session to use </td></tr>
    <tr><td class="paramname">key_id</td><td>Object ID of the key. 0 if the Object ID should be generated by the device </td></tr>
    <tr><td class="paramname">label</td><td>Label of the key. Maximum length is <a class="el" href="yubihsm_8h.html#a431f8b753552a8b2f5f980e871b6d019" title="Max length of object labels. ">YH_OBJ_LABEL_LEN</a> </td></tr>
    <tr><td class="paramname">domains</td><td>Domains to which the key belongs specified as an unsigned int. See <a class="el" href="yubihsm_8h.html#a96a4c751a281515d5610adb8fd779438" title="Convert a string to a domain&#39;s numeric value. ">yh_string_to_domains()</a> </td></tr>
    <tr><td class="paramname">capabilities</td><td>Capabilities of the key. See <a class="el" href="yubihsm_8h.html#aab440e1cb671d9ba7a2e7d1243960e42" title="Convert capability string to byte array. ">yh_string_to_capabilities()</a> </td></tr>
    <tr><td class="paramname">algorithm</td><td>Algorithm of the key to import. Must be one of: <a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55caaedcbc07d82b18ca5c21eb3379a6cc010" title="ecp224 ">YH_ALGO_EC_P224</a>, <a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55caae4b191baf5c65f9234120080264d129b" title="ecp256 ">YH_ALGO_EC_P256</a>, <a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55caad423056b13955068935dc8b3ac0e65d1" title="eck256 ">YH_ALGO_EC_K256</a>, <a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55caabd995726d45b6dd2388775db4767c80d" title="ecbp256 ">YH_ALGO_EC_BP256</a>, <a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55caa31094c17c66e4c365ca3dad353bc8bda" title="ecp384 ">YH_ALGO_EC_P384</a>, <a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55caa228fd3332b55c60438dfea6a1b09af36" title="ecbp384 ">YH_ALGO_EC_BP384</a>, <a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55caab9c1be17b7b3f755346ff8c3cca3ed25" title="ecbp512 ">YH_ALGO_EC_BP512</a> or <a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55caa05aec903fd67851f968aaa606fe2138a" title="ecp521 ">YH_ALGO_EC_P521</a> </td></tr>
    <tr><td class="paramname">s</td><td>the EC key to import</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a405155512dc2284dc210ed15be1d0815" title="Returned value when function was successful. ">YHR_SUCCESS</a> if successful. <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a731b3992b45fde61b6760d92de4dbbf5" title="Returned value when an argument to a function is invalid. ">YHR_INVALID_PARAMETERS</a> input parameters are NULL or the algorithm is not one of <a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55caaedcbc07d82b18ca5c21eb3379a6cc010" title="ecp224 ">YH_ALGO_EC_P224</a>, <a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55caae4b191baf5c65f9234120080264d129b" title="ecp256 ">YH_ALGO_EC_P256</a>, <a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55caad423056b13955068935dc8b3ac0e65d1" title="eck256 ">YH_ALGO_EC_K256</a>, <a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55caabd995726d45b6dd2388775db4767c80d" title="ecbp256 ">YH_ALGO_EC_BP256</a>, <a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55caa31094c17c66e4c365ca3dad353bc8bda" title="ecp384 ">YH_ALGO_EC_P384</a>, <a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55caa228fd3332b55c60438dfea6a1b09af36" title="ecbp384 ">YH_ALGO_EC_BP384</a>, <a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55caab9c1be17b7b3f755346ff8c3cca3ed25" title="ecbp512 ">YH_ALGO_EC_BP512</a> or <a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55caa05aec903fd67851f968aaa606fe2138a" title="ecp521 ">YH_ALGO_EC_P521</a>. See <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366" title="Return codes. ">yh_rc</a> for other possible errors </dd></dl>

</div>
</div>
<a id="a7a886e052bc1571f24c6b7f0c57e2d8c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7a886e052bc1571f24c6b7f0c57e2d8c">&#9670;&nbsp;</a></span>yh_util_import_ed_key()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a> yh_util_import_ed_key </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="yubihsm_8h.html#aa3420d8ccc1fb0b0dee1af5a53cc79de">yh_session</a> *&#160;</td>
          <td class="paramname"><em>session</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t *&#160;</td>
          <td class="paramname"><em>key_id</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>label</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t&#160;</td>
          <td class="paramname"><em>domains</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structyh__capabilities.html">yh_capabilities</a> *&#160;</td>
          <td class="paramname"><em>capabilities</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55ca">yh_algorithm</a>&#160;</td>
          <td class="paramname"><em>algorithm</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const uint8_t *&#160;</td>
          <td class="paramname"><em>k</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Import an ED key into the device. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">session</td><td>Authenticated session to use </td></tr>
    <tr><td class="paramname">key_id</td><td>Object ID of the key will have. 0 if the Object ID should be generated by the device </td></tr>
    <tr><td class="paramname">label</td><td>Label of the key. Maximum length is <a class="el" href="yubihsm_8h.html#a431f8b753552a8b2f5f980e871b6d019" title="Max length of object labels. ">YH_OBJ_LABEL_LEN</a> </td></tr>
    <tr><td class="paramname">domains</td><td>Domains to which the key belongs. See <a class="el" href="yubihsm_8h.html#a96a4c751a281515d5610adb8fd779438" title="Convert a string to a domain&#39;s numeric value. ">yh_string_to_domains()</a> </td></tr>
    <tr><td class="paramname">capabilities</td><td>Capabilities of the key. See <a class="el" href="yubihsm_8h.html#aab440e1cb671d9ba7a2e7d1243960e42" title="Convert capability string to byte array. ">yh_string_to_capabilities()</a> </td></tr>
    <tr><td class="paramname">algorithm</td><td>Algorithm of the key to import. Must be <a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55caa68c2c97f16c36f727e41a899d8a7e8bd" title="ed25519 ">YH_ALGO_EC_ED25519</a> </td></tr>
    <tr><td class="paramname">k</td><td>the ED key to import</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a405155512dc2284dc210ed15be1d0815" title="Returned value when function was successful. ">YHR_SUCCESS</a> if successful. <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a731b3992b45fde61b6760d92de4dbbf5" title="Returned value when an argument to a function is invalid. ">YHR_INVALID_PARAMETERS</a> input parameters are NULL or the algorithm is not <a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55caa68c2c97f16c36f727e41a899d8a7e8bd" title="ed25519 ">YH_ALGO_EC_ED25519</a>. See <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366" title="Return codes. ">yh_rc</a> for other possible errors </dd></dl>

</div>
</div>
<a id="a19c79faaf10c405864f0179821d551a5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a19c79faaf10c405864f0179821d551a5">&#9670;&nbsp;</a></span>yh_util_import_hmac_key()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a> yh_util_import_hmac_key </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="yubihsm_8h.html#aa3420d8ccc1fb0b0dee1af5a53cc79de">yh_session</a> *&#160;</td>
          <td class="paramname"><em>session</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t *&#160;</td>
          <td class="paramname"><em>key_id</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>label</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t&#160;</td>
          <td class="paramname"><em>domains</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structyh__capabilities.html">yh_capabilities</a> *&#160;</td>
          <td class="paramname"><em>capabilities</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55ca">yh_algorithm</a>&#160;</td>
          <td class="paramname"><em>algorithm</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const uint8_t *&#160;</td>
          <td class="paramname"><em>key</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>key_len</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Import an HMAC key into the device. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">session</td><td>Authenticated session to use </td></tr>
    <tr><td class="paramname">key_id</td><td>Object ID of the key. 0 if the Object ID should be generated by the device </td></tr>
    <tr><td class="paramname">label</td><td>Label of the key. Maxium length is <a class="el" href="yubihsm_8h.html#a431f8b753552a8b2f5f980e871b6d019" title="Max length of object labels. ">YH_OBJ_LABEL_LEN</a> </td></tr>
    <tr><td class="paramname">domains</td><td>Domains to which the key belongs. See <a class="el" href="yubihsm_8h.html#a96a4c751a281515d5610adb8fd779438" title="Convert a string to a domain&#39;s numeric value. ">yh_string_to_domains()</a> </td></tr>
    <tr><td class="paramname">capabilities</td><td>Capabilities of the key. See <a class="el" href="yubihsm_8h.html#aab440e1cb671d9ba7a2e7d1243960e42" title="Convert capability string to byte array. ">yh_string_to_capabilities()</a> </td></tr>
    <tr><td class="paramname">algorithm</td><td>Algorithm of the key to import. Must be one of: <a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55caa942e65c8cd0034eebe9a20c2297c7b06" title="hmac-sha1 ">YH_ALGO_HMAC_SHA1</a>, <a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55caab0a0e1eb424b61057f159f1e53311f5c" title="hmac-sha256 ">YH_ALGO_HMAC_SHA256</a>, <a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55caa781e7ca62563917d2129bde8ec53401b" title="hmac-sha384 ">YH_ALGO_HMAC_SHA384</a> or <a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55caa72d6c7ea77f10e39bbadc8b58d55b9ec" title="hmac-sha512 ">YH_ALGO_HMAC_SHA512</a> </td></tr>
    <tr><td class="paramname">key</td><td>The HMAC key to import </td></tr>
    <tr><td class="paramname">key_len</td><td>Length of the HMAC key to import</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a405155512dc2284dc210ed15be1d0815" title="Returned value when function was successful. ">YHR_SUCCESS</a> if successful. <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a731b3992b45fde61b6760d92de4dbbf5" title="Returned value when an argument to a function is invalid. ">YHR_INVALID_PARAMETERS</a> input parameters are NULL. See <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366" title="Return codes. ">yh_rc</a> for other possible errors </dd></dl>

</div>
</div>
<a id="a1249c920eec24f634d04eaafb90a1ca2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1249c920eec24f634d04eaafb90a1ca2">&#9670;&nbsp;</a></span>yh_util_import_opaque()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a> yh_util_import_opaque </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="yubihsm_8h.html#aa3420d8ccc1fb0b0dee1af5a53cc79de">yh_session</a> *&#160;</td>
          <td class="paramname"><em>session</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t *&#160;</td>
          <td class="paramname"><em>object_id</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>label</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t&#160;</td>
          <td class="paramname"><em>domains</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structyh__capabilities.html">yh_capabilities</a> *&#160;</td>
          <td class="paramname"><em>capabilities</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55ca">yh_algorithm</a>&#160;</td>
          <td class="paramname"><em>algorithm</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const uint8_t *&#160;</td>
          <td class="paramname"><em>in</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>in_len</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Import an <a class="el" href="yubihsm_8h.html#a2fe39512cb4df34b270a67dbb8e13583a5d37b7418d50b420621e6a6eb2700de4" title="Opaque Object is an unchecked kind of Object, normally used to store raw data in the device...">YH_OPAQUE</a> object into the device. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">session</td><td>Authenticated session to use </td></tr>
    <tr><td class="paramname">object_id</td><td>Object ID of the Opaque object. 0 if the Object ID should be generated by the device </td></tr>
    <tr><td class="paramname">label</td><td>Label of the Opaque object. Maximum length is <a class="el" href="yubihsm_8h.html#a431f8b753552a8b2f5f980e871b6d019" title="Max length of object labels. ">YH_OBJ_LABEL_LEN</a> </td></tr>
    <tr><td class="paramname">domains</td><td>Domains the Opaque object will be operating within. See <a class="el" href="yubihsm_8h.html#a96a4c751a281515d5610adb8fd779438" title="Convert a string to a domain&#39;s numeric value. ">yh_string_to_domains()</a> </td></tr>
    <tr><td class="paramname">capabilities</td><td>Capabilities of the Opaque object. See <a class="el" href="yubihsm_8h.html#aab440e1cb671d9ba7a2e7d1243960e42" title="Convert capability string to byte array. ">yh_string_to_capabilities()</a> </td></tr>
    <tr><td class="paramname">algorithm</td><td>Algorithm of the Opaque object </td></tr>
    <tr><td class="paramname">in</td><td>the Opaque object to import </td></tr>
    <tr><td class="paramname">in_len</td><td>Length of the Opaque object to import</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a405155512dc2284dc210ed15be1d0815" title="Returned value when function was successful. ">YHR_SUCCESS</a> if successful. <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a731b3992b45fde61b6760d92de4dbbf5" title="Returned value when an argument to a function is invalid. ">YHR_INVALID_PARAMETERS</a> if input parameters are NULL or <code>in_len</code> is too big. See <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366" title="Return codes. ">yh_rc</a> for other possible errors </dd></dl>

</div>
</div>
<a id="addc22271306d847f53321984f41d818b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#addc22271306d847f53321984f41d818b">&#9670;&nbsp;</a></span>yh_util_import_otp_aead_key()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a> yh_util_import_otp_aead_key </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="yubihsm_8h.html#aa3420d8ccc1fb0b0dee1af5a53cc79de">yh_session</a> *&#160;</td>
          <td class="paramname"><em>session</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t *&#160;</td>
          <td class="paramname"><em>key_id</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>label</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t&#160;</td>
          <td class="paramname"><em>domains</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structyh__capabilities.html">yh_capabilities</a> *&#160;</td>
          <td class="paramname"><em>capabilities</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint32_t&#160;</td>
          <td class="paramname"><em>nonce_id</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const uint8_t *&#160;</td>
          <td class="paramname"><em>in</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>in_len</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Import an <a class="el" href="yubihsm_8h.html#a2fe39512cb4df34b270a67dbb8e13583a02c5f683fde147de6a9e1043f971f5f0" title="OTP AEAD Key is a secret key used to decrypt Yubico OTP values. ">YH_OTP_AEAD_KEY</a> used for Yubico OTP Decryption. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">session</td><td>Authenticated session to use </td></tr>
    <tr><td class="paramname">key_id</td><td>Object ID of the AEAD Key. 0 if the Object ID should be generated by the device </td></tr>
    <tr><td class="paramname">label</td><td>Label of the AEAD Key. Maximum length is <a class="el" href="yubihsm_8h.html#a431f8b753552a8b2f5f980e871b6d019" title="Max length of object labels. ">YH_OBJ_LABEL_LEN</a> </td></tr>
    <tr><td class="paramname">domains</td><td>Domains the AEAD Key will be operating within. See <a class="el" href="yubihsm_8h.html#a96a4c751a281515d5610adb8fd779438" title="Convert a string to a domain&#39;s numeric value. ">yh_string_to_domains()</a> </td></tr>
    <tr><td class="paramname">capabilities</td><td>Capabilities of the AEAD Key. See <a class="el" href="yubihsm_8h.html#aab440e1cb671d9ba7a2e7d1243960e42" title="Convert capability string to byte array. ">yh_string_to_capabilities()</a> </td></tr>
    <tr><td class="paramname">nonce_id</td><td>Nonce ID </td></tr>
    <tr><td class="paramname">in</td><td>AEAD Key to import </td></tr>
    <tr><td class="paramname">in_len</td><td>Length of AEAD Key to import. Must be 16, 24 or 32</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a405155512dc2284dc210ed15be1d0815" title="Returned value when function was successful. ">YHR_SUCCESS</a> if successful. <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a731b3992b45fde61b6760d92de4dbbf5" title="Returned value when an argument to a function is invalid. ">YHR_INVALID_PARAMETERS</a> if input parameters are NULL or if <code>in_len</code> is not one of 16, 24 or 32. See <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366" title="Return codes. ">yh_rc</a> for other possible errors </dd></dl>

</div>
</div>
<a id="ab0ca24007ce6942d2185859560c43e8a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab0ca24007ce6942d2185859560c43e8a">&#9670;&nbsp;</a></span>yh_util_import_rsa_key()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a> yh_util_import_rsa_key </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="yubihsm_8h.html#aa3420d8ccc1fb0b0dee1af5a53cc79de">yh_session</a> *&#160;</td>
          <td class="paramname"><em>session</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t *&#160;</td>
          <td class="paramname"><em>key_id</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>label</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t&#160;</td>
          <td class="paramname"><em>domains</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structyh__capabilities.html">yh_capabilities</a> *&#160;</td>
          <td class="paramname"><em>capabilities</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55ca">yh_algorithm</a>&#160;</td>
          <td class="paramname"><em>algorithm</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const uint8_t *&#160;</td>
          <td class="paramname"><em>p</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const uint8_t *&#160;</td>
          <td class="paramname"><em>q</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Import an RSA key into the device. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">session</td><td>Authenticated session to use </td></tr>
    <tr><td class="paramname">key_id</td><td>Object ID the key. 0 if Object ID should be generated by the device </td></tr>
    <tr><td class="paramname">label</td><td>Label of the key. Maximum length is <a class="el" href="yubihsm_8h.html#a431f8b753552a8b2f5f980e871b6d019" title="Max length of object labels. ">YH_OBJ_LABEL_LEN</a> </td></tr>
    <tr><td class="paramname">domains</td><td>Domains to which the key belongs specified as an unsigned int. See <a class="el" href="yubihsm_8h.html#a96a4c751a281515d5610adb8fd779438" title="Convert a string to a domain&#39;s numeric value. ">yh_string_to_domains()</a> </td></tr>
    <tr><td class="paramname">capabilities</td><td>Capabilities of the key. See <a class="el" href="yubihsm_8h.html#aab440e1cb671d9ba7a2e7d1243960e42" title="Convert capability string to byte array. ">yh_string_to_capabilities()</a> </td></tr>
    <tr><td class="paramname">algorithm</td><td>Algorithm of the key to import. Must be one of: <a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55caaafe94e6a770edb51c6db84f77d98d2c6" title="rsa2048 ">YH_ALGO_RSA_2048</a>, <a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55caafd3fbd9ed86caf267ccc77cb24d44426" title="rsa3072 ">YH_ALGO_RSA_3072</a> or <a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55caae5963322a0a0f43a1b74faa78e3a7329" title="rsa4096 ">YH_ALGO_RSA_4096</a> </td></tr>
    <tr><td class="paramname">p</td><td>P component of the RSA key to import </td></tr>
    <tr><td class="paramname">q</td><td>Q component of the RSA key to import</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a405155512dc2284dc210ed15be1d0815" title="Returned value when function was successful. ">YHR_SUCCESS</a> if successful. <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a731b3992b45fde61b6760d92de4dbbf5" title="Returned value when an argument to a function is invalid. ">YHR_INVALID_PARAMETERS</a> input parameters are NULL or the algorithm is not one of <a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55caaafe94e6a770edb51c6db84f77d98d2c6" title="rsa2048 ">YH_ALGO_RSA_2048</a>, <a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55caafd3fbd9ed86caf267ccc77cb24d44426" title="rsa3072 ">YH_ALGO_RSA_3072</a> or <a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55caae5963322a0a0f43a1b74faa78e3a7329" title="rsa4096 ">YH_ALGO_RSA_4096</a>. See <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366" title="Return codes. ">yh_rc</a> for other possible errors </dd></dl>

</div>
</div>
<a id="ae0fc8d6520950868365011d1a9f450f1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae0fc8d6520950868365011d1a9f450f1">&#9670;&nbsp;</a></span>yh_util_import_template()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a> yh_util_import_template </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="yubihsm_8h.html#aa3420d8ccc1fb0b0dee1af5a53cc79de">yh_session</a> *&#160;</td>
          <td class="paramname"><em>session</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t *&#160;</td>
          <td class="paramname"><em>object_id</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>label</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t&#160;</td>
          <td class="paramname"><em>domains</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structyh__capabilities.html">yh_capabilities</a> *&#160;</td>
          <td class="paramname"><em>capabilities</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55ca">yh_algorithm</a>&#160;</td>
          <td class="paramname"><em>algorithm</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const uint8_t *&#160;</td>
          <td class="paramname"><em>in</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>in_len</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Import a <a class="el" href="yubihsm_8h.html#a2fe39512cb4df34b270a67dbb8e13583a96244762de5ce4175e60157239e7a097" title="Template is a binary object used for example to validate SSH certificate requests. ">YH_TEMPLATE</a> object into the device. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">session</td><td>Authenticated session to use </td></tr>
    <tr><td class="paramname">object_id</td><td>Object ID of the Template. 0 if the Object ID should be generated by the device </td></tr>
    <tr><td class="paramname">label</td><td>Label of the Template. Maximum length is <a class="el" href="yubihsm_8h.html#a431f8b753552a8b2f5f980e871b6d019" title="Max length of object labels. ">YH_OBJ_LABEL_LEN</a> </td></tr>
    <tr><td class="paramname">domains</td><td>Domains the Template will be operating within. See <a class="el" href="yubihsm_8h.html#a96a4c751a281515d5610adb8fd779438" title="Convert a string to a domain&#39;s numeric value. ">yh_string_to_domains()</a> </td></tr>
    <tr><td class="paramname">capabilities</td><td>Capabilities of the Template. See <a class="el" href="yubihsm_8h.html#aab440e1cb671d9ba7a2e7d1243960e42" title="Convert capability string to byte array. ">yh_string_to_capabilities</a> </td></tr>
    <tr><td class="paramname">algorithm</td><td>Algorithm of the Template </td></tr>
    <tr><td class="paramname">in</td><td>Template to import </td></tr>
    <tr><td class="paramname">in_len</td><td>Length of the Template to import</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a405155512dc2284dc210ed15be1d0815" title="Returned value when function was successful. ">YHR_SUCCESS</a> if successful. <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a731b3992b45fde61b6760d92de4dbbf5" title="Returned value when an argument to a function is invalid. ">YHR_INVALID_PARAMETERS</a> if input parameters are NULL or if <code>in_len</code> is too big. See <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366" title="Return codes. ">yh_rc</a> for other possible errors </dd></dl>

</div>
</div>
<a id="a3a9729ea5b2e299a735b43f2b23e50a7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3a9729ea5b2e299a735b43f2b23e50a7">&#9670;&nbsp;</a></span>yh_util_import_wrap_key()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a> yh_util_import_wrap_key </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="yubihsm_8h.html#aa3420d8ccc1fb0b0dee1af5a53cc79de">yh_session</a> *&#160;</td>
          <td class="paramname"><em>session</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t *&#160;</td>
          <td class="paramname"><em>key_id</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>label</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t&#160;</td>
          <td class="paramname"><em>domains</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structyh__capabilities.html">yh_capabilities</a> *&#160;</td>
          <td class="paramname"><em>capabilities</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55ca">yh_algorithm</a>&#160;</td>
          <td class="paramname"><em>algorithm</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structyh__capabilities.html">yh_capabilities</a> *&#160;</td>
          <td class="paramname"><em>delegated_capabilities</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const uint8_t *&#160;</td>
          <td class="paramname"><em>in</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>in_len</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Import a Wrap Key into the device. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">session</td><td>Authenticated session to use </td></tr>
    <tr><td class="paramname">key_id</td><td>Object ID the Wrap Key. 0 if the Object ID should be generated by the device </td></tr>
    <tr><td class="paramname">label</td><td>Label of the Wrap Key. Maximum length is <a class="el" href="yubihsm_8h.html#a431f8b753552a8b2f5f980e871b6d019" title="Max length of object labels. ">YH_OBJ_LABEL_LEN</a> </td></tr>
    <tr><td class="paramname">domains</td><td>Domains where the Wrap Key will be operating within. See <a class="el" href="yubihsm_8h.html#a96a4c751a281515d5610adb8fd779438" title="Convert a string to a domain&#39;s numeric value. ">yh_string_to_domains()</a> </td></tr>
    <tr><td class="paramname">capabilities</td><td>Capabilities of the Wrap Key. See <a class="el" href="yubihsm_8h.html#aab440e1cb671d9ba7a2e7d1243960e42" title="Convert capability string to byte array. ">yh_string_to_capabilities()</a> </td></tr>
    <tr><td class="paramname">algorithm</td><td>Algorithm of the Wrap Key. Supported algorithms: <a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55caae22b228e457c9bdccb5a93d81730b1b1" title="aes128-ccm-wrap ">YH_ALGO_AES128_CCM_WRAP</a>, <a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55caab739a1d142dacaf37ba13a73e2d83fab" title="aes192-ccm-wrap ">YH_ALGO_AES192_CCM_WRAP</a> and <a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55caa927e2246e5657f946b4da4b71092b022" title="aes256-ccm-wrap ">YH_ALGO_AES256_CCM_WRAP</a> </td></tr>
    <tr><td class="paramname">delegated_capabilities</td><td>Delegated capabilities of the Wrap Key. See <a class="el" href="yubihsm_8h.html#aab440e1cb671d9ba7a2e7d1243960e42" title="Convert capability string to byte array. ">yh_string_to_capabilities()</a> </td></tr>
    <tr><td class="paramname">in</td><td>the Wrap Key to import </td></tr>
    <tr><td class="paramname">in_len</td><td>Length of the Wrap Key to import</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a405155512dc2284dc210ed15be1d0815" title="Returned value when function was successful. ">YHR_SUCCESS</a> if successful. <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a731b3992b45fde61b6760d92de4dbbf5" title="Returned value when an argument to a function is invalid. ">YHR_INVALID_PARAMETERS</a> if input parameters are NULL, <code>in_len</code> is not what expected based on the algorithm and if the algorithms is not one of <a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55caae22b228e457c9bdccb5a93d81730b1b1" title="aes128-ccm-wrap ">YH_ALGO_AES128_CCM_WRAP</a>, <a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55caab739a1d142dacaf37ba13a73e2d83fab" title="aes192-ccm-wrap ">YH_ALGO_AES192_CCM_WRAP</a> or <a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55caa927e2246e5657f946b4da4b71092b022" title="aes256-ccm-wrap ">YH_ALGO_AES256_CCM_WRAP</a>. See <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366" title="Return codes. ">yh_rc</a> for other possible errors </dd></dl>

</div>
</div>
<a id="ae5bf13f9558bb0340468b722accf94d3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae5bf13f9558bb0340468b722accf94d3">&#9670;&nbsp;</a></span>yh_util_import_wrapped()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a> yh_util_import_wrapped </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="yubihsm_8h.html#aa3420d8ccc1fb0b0dee1af5a53cc79de">yh_session</a> *&#160;</td>
          <td class="paramname"><em>session</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t&#160;</td>
          <td class="paramname"><em>wrapping_key_id</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const uint8_t *&#160;</td>
          <td class="paramname"><em>in</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>in_len</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="yubihsm_8h.html#a2fe39512cb4df34b270a67dbb8e13583">yh_object_type</a> *&#160;</td>
          <td class="paramname"><em>target_type</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t *&#160;</td>
          <td class="paramname"><em>target_id</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Import a wrapped object into the device. </p>
<p>The object should have been previously exported by <a class="el" href="yubihsm_8h.html#aa3f473e6dbb9188ad0269b40921c4f5f" title="Export an object under wrap from the device. ">yh_util_export_wrapped()</a></p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">session</td><td>Authenticated session to use </td></tr>
    <tr><td class="paramname">wrapping_key_id</td><td>Object ID of the Wrap Key to use to unwrap the object </td></tr>
    <tr><td class="paramname">in</td><td>Wrapped data </td></tr>
    <tr><td class="paramname">in_len</td><td>Length of wrapped data </td></tr>
    <tr><td class="paramname">target_type</td><td>Type of the imported object </td></tr>
    <tr><td class="paramname">target_id</td><td>Object ID of the imported object</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a405155512dc2284dc210ed15be1d0815" title="Returned value when function was successful. ">YHR_SUCCESS</a> if successful. <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a731b3992b45fde61b6760d92de4dbbf5" title="Returned value when an argument to a function is invalid. ">YHR_INVALID_PARAMETERS</a> if input parameters are NULL. See <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366" title="Return codes. ">yh_rc</a> for other possible errors </dd></dl>

</div>
</div>
<a id="a7cbea7103efff8473ccfaaa35bfc6346"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7cbea7103efff8473ccfaaa35bfc6346">&#9670;&nbsp;</a></span>yh_util_list_objects()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a> yh_util_list_objects </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="yubihsm_8h.html#aa3420d8ccc1fb0b0dee1af5a53cc79de">yh_session</a> *&#160;</td>
          <td class="paramname"><em>session</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t&#160;</td>
          <td class="paramname"><em>id</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="yubihsm_8h.html#a2fe39512cb4df34b270a67dbb8e13583">yh_object_type</a>&#160;</td>
          <td class="paramname"><em>type</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t&#160;</td>
          <td class="paramname"><em>domains</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structyh__capabilities.html">yh_capabilities</a> *&#160;</td>
          <td class="paramname"><em>capabilities</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55ca">yh_algorithm</a>&#160;</td>
          <td class="paramname"><em>algorithm</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>label</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structyh__object__descriptor.html">yh_object_descriptor</a> *&#160;</td>
          <td class="paramname"><em>objects</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t *&#160;</td>
          <td class="paramname"><em>n_objects</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>List objects accessible from the session. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">session</td><td>Authenticated session to use </td></tr>
    <tr><td class="paramname">id</td><td>Object ID to filter by (0 to not filter by ID) </td></tr>
    <tr><td class="paramname">type</td><td>Object type to filter by (0 to not filter by type). See <a class="el" href="yubihsm_8h.html#a2fe39512cb4df34b270a67dbb8e13583" title="Object types. ">yh_object_type</a> </td></tr>
    <tr><td class="paramname">domains</td><td>Domains to filter by (0 to not filter by domain) </td></tr>
    <tr><td class="paramname">capabilities</td><td>Capabilities to filter by (0 to not filter by capabilities). See <a class="el" href="structyh__capabilities.html" title="Capabilities representation. ">yh_capabilities</a> </td></tr>
    <tr><td class="paramname">algorithm</td><td>Algorithm to filter by (0 to not filter by algorithm) </td></tr>
    <tr><td class="paramname">label</td><td>Label to filter by </td></tr>
    <tr><td class="paramname">objects</td><td>Array of objects returned </td></tr>
    <tr><td class="paramname">n_objects</td><td>Max number of objects (will be set to number found on return)</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a405155512dc2284dc210ed15be1d0815" title="Returned value when function was successful. ">YHR_SUCCESS</a> if successful. <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a731b3992b45fde61b6760d92de4dbbf5" title="Returned value when an argument to a function is invalid. ">YHR_INVALID_PARAMETERS</a> if input parameters are NULL. <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366ad8971a0b9647564b76b3f4e4b662c965" title="Returned value when there is not enough space to store data. ">YHR_BUFFER_TOO_SMALL</a> if n_objects is smaller than the number of objects found. See <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366" title="Return codes. ">yh_rc</a> for other possible errors.</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a href="https://developers.yubico.com/YubiHSM2/Concepts/Object.html">Objects</a>, <a href="https://developers.yubico.com/YubiHSM2/Concepts/Domain.html">Domains</a>, <a href="https://developers.yubico.com/YubiHSM2/Concepts/Capability.html">Capabilities</a>, <a href="https://developers.yubico.com/YubiHSM2/Concepts/Algorithms.html">Algorithms</a>, <a href="https://developers.yubico.com/YubiHSM2/Concepts/Label.html">Labels</a> </dd></dl>

</div>
</div>
<a id="a4bb1d420f681bc91bd36dc08695dbad6"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4bb1d420f681bc91bd36dc08695dbad6">&#9670;&nbsp;</a></span>yh_util_randomize_otp_aead()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a> yh_util_randomize_otp_aead </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="yubihsm_8h.html#aa3420d8ccc1fb0b0dee1af5a53cc79de">yh_session</a> *&#160;</td>
          <td class="paramname"><em>session</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t&#160;</td>
          <td class="paramname"><em>key_id</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t *&#160;</td>
          <td class="paramname"><em>out</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t *&#160;</td>
          <td class="paramname"><em>out_len</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Create OTP AEAD from random data. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">session</td><td>Authenticated session to use </td></tr>
    <tr><td class="paramname">key_id</td><td>Object ID of the Otp-aead Key to use </td></tr>
    <tr><td class="paramname">out</td><td>The created AEAD </td></tr>
    <tr><td class="paramname">out_len</td><td>Length of the created AEAD</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a405155512dc2284dc210ed15be1d0815" title="Returned value when function was successful. ">YHR_SUCCESS</a> if successful. <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a731b3992b45fde61b6760d92de4dbbf5" title="Returned value when an argument to a function is invalid. ">YHR_INVALID_PARAMETERS</a> if input parameters are NULL. See <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366" title="Return codes. ">yh_rc</a> for other possible errors </dd></dl>

</div>
</div>
<a id="a5c153fe27877bcc7927d391fb55550af"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5c153fe27877bcc7927d391fb55550af">&#9670;&nbsp;</a></span>yh_util_reset_device()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a> yh_util_reset_device </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="yubihsm_8h.html#aa3420d8ccc1fb0b0dee1af5a53cc79de">yh_session</a> *&#160;</td>
          <td class="paramname"><em>session</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Factory reset the device. </p>
<p>Resets and reboots the device, deletes all Objects and restores the default <a class="el" href="yubihsm_8h.html#a2fe39512cb4df34b270a67dbb8e13583acee44b775b3c5b6157f0732699935074" title="Authentication Key is used to establish Sessions with a device. ">YH_AUTHENTICATION_KEY</a>.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">session</td><td>Authenticated session to use</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a405155512dc2284dc210ed15be1d0815" title="Returned value when function was successful. ">YHR_SUCCESS</a> if successful. <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a731b3992b45fde61b6760d92de4dbbf5" title="Returned value when an argument to a function is invalid. ">YHR_INVALID_PARAMETERS</a> if the session is NULL. See <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366" title="Return codes. ">yh_rc</a> for other possible errors </dd></dl>

</div>
</div>
<a id="a9d844855c9066bbea0e4344978dd7fdc"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9d844855c9066bbea0e4344978dd7fdc">&#9670;&nbsp;</a></span>yh_util_set_log_index()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a> yh_util_set_log_index </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="yubihsm_8h.html#aa3420d8ccc1fb0b0dee1af5a53cc79de">yh_session</a> *&#160;</td>
          <td class="paramname"><em>session</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t&#160;</td>
          <td class="paramname"><em>index</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set the index of the last extracted log entry. </p>
<p>This function should be called after <a class="el" href="yubihsm_8h.html#a5ae52ad56b7e83baeb33b46104263aa6" title="Get audit logs from the device. ">yh_util_get_log_entries()</a> to inform the device what the last extracted log entry is so new logs can be written. This is used when forced auditing is enabled.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">session</td><td>Authenticated session to use </td></tr>
    <tr><td class="paramname">index</td><td>index to set. Should be the same index as the last entry extracted using <a class="el" href="yubihsm_8h.html#a5ae52ad56b7e83baeb33b46104263aa6" title="Get audit logs from the device. ">yh_util_get_log_entries()</a></td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a405155512dc2284dc210ed15be1d0815" title="Returned value when function was successful. ">YHR_SUCCESS</a> if successful. <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a731b3992b45fde61b6760d92de4dbbf5" title="Returned value when an argument to a function is invalid. ">YHR_INVALID_PARAMETERS</a> if the session is NULL. See <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366" title="Return codes. ">yh_rc</a> for other possible errors </dd></dl>

</div>
</div>
<a id="a85ac840aec77cb1ca3c3ce1f2ab26282"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a85ac840aec77cb1ca3c3ce1f2ab26282">&#9670;&nbsp;</a></span>yh_util_set_option()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a> yh_util_set_option </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="yubihsm_8h.html#aa3420d8ccc1fb0b0dee1af5a53cc79de">yh_session</a> *&#160;</td>
          <td class="paramname"><em>session</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="yubihsm_8h.html#acc8090ce0ec5029b376803e44b1cb4aa">yh_option</a>&#160;</td>
          <td class="paramname"><em>option</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>len</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t *&#160;</td>
          <td class="paramname"><em>val</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Set a device-global option. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">session</td><td>Authenticated session to use </td></tr>
    <tr><td class="paramname">option</td><td>Option to set. See <a class="el" href="yubihsm_8h.html#acc8090ce0ec5029b376803e44b1cb4aa" title="Global options. ">yh_option</a> </td></tr>
    <tr><td class="paramname">len</td><td>Length of option value </td></tr>
    <tr><td class="paramname">val</td><td>Option value</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a405155512dc2284dc210ed15be1d0815" title="Returned value when function was successful. ">YHR_SUCCESS</a> if successful. <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a731b3992b45fde61b6760d92de4dbbf5" title="Returned value when an argument to a function is invalid. ">YHR_INVALID_PARAMETERS</a> if <code>session</code> or <code>val</code> are NULL or if <code>len</code> is too long. See <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366" title="Return codes. ">yh_rc</a> for other possible errors </dd></dl>

</div>
</div>
<a id="a5988faffd97366b188728ff1a7fb6e89"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5988faffd97366b188728ff1a7fb6e89">&#9670;&nbsp;</a></span>yh_util_sign_attestation_certificate()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a> yh_util_sign_attestation_certificate </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="yubihsm_8h.html#aa3420d8ccc1fb0b0dee1af5a53cc79de">yh_session</a> *&#160;</td>
          <td class="paramname"><em>session</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t&#160;</td>
          <td class="paramname"><em>key_id</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t&#160;</td>
          <td class="paramname"><em>attest_id</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t *&#160;</td>
          <td class="paramname"><em>out</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t *&#160;</td>
          <td class="paramname"><em>out_len</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Get attestation of an Asymmetric Key in the form of an X.509 certificate. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">session</td><td>Authenticated session to use </td></tr>
    <tr><td class="paramname">key_id</td><td>Object ID of the Asymmetric Key to attest </td></tr>
    <tr><td class="paramname">attest_id</td><td>Object ID for the key used to sign the attestation certificate </td></tr>
    <tr><td class="paramname">out</td><td>The attestation certificate </td></tr>
    <tr><td class="paramname">out_len</td><td>Length of the attestation certificate</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a405155512dc2284dc210ed15be1d0815" title="Returned value when function was successful. ">YHR_SUCCESS</a> if successful. <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a731b3992b45fde61b6760d92de4dbbf5" title="Returned value when an argument to a function is invalid. ">YHR_INVALID_PARAMETERS</a> if input parameters are NULL. See <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366" title="Return codes. ">yh_rc</a> for other possible errors </dd></dl>

</div>
</div>
<a id="a5121c90d3bd745afd8264fef2ef39ace"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5121c90d3bd745afd8264fef2ef39ace">&#9670;&nbsp;</a></span>yh_util_sign_ecdsa()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a> yh_util_sign_ecdsa </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="yubihsm_8h.html#aa3420d8ccc1fb0b0dee1af5a53cc79de">yh_session</a> *&#160;</td>
          <td class="paramname"><em>session</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t&#160;</td>
          <td class="paramname"><em>key_id</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const uint8_t *&#160;</td>
          <td class="paramname"><em>in</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>in_len</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t *&#160;</td>
          <td class="paramname"><em>out</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t *&#160;</td>
          <td class="paramname"><em>out_len</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Sign data using ECDSA. </p>
<p><code>in</code> is a raw hashed message, a truncated hash to the curve length or a padded hash to the curve length</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">session</td><td>Authenticated session to use </td></tr>
    <tr><td class="paramname">key_id</td><td>Object ID of the signing key </td></tr>
    <tr><td class="paramname">in</td><td>Data to sign </td></tr>
    <tr><td class="paramname">in_len</td><td>Length of data to sign </td></tr>
    <tr><td class="paramname">out</td><td>Signed data </td></tr>
    <tr><td class="paramname">out_len</td><td>Length of signed data</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a405155512dc2284dc210ed15be1d0815" title="Returned value when function was successful. ">YHR_SUCCESS</a> if successful. <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a731b3992b45fde61b6760d92de4dbbf5" title="Returned value when an argument to a function is invalid. ">YHR_INVALID_PARAMETERS</a> input parameters are NULL or if <code>in_len</code> is not 20, 28, 34, 48, 64 or 66. See <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366" title="Return codes. ">yh_rc</a> for other possible errors </dd></dl>

</div>
</div>
<a id="a690a5585de21ce82495e139ec1dfdf9d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a690a5585de21ce82495e139ec1dfdf9d">&#9670;&nbsp;</a></span>yh_util_sign_eddsa()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a> yh_util_sign_eddsa </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="yubihsm_8h.html#aa3420d8ccc1fb0b0dee1af5a53cc79de">yh_session</a> *&#160;</td>
          <td class="paramname"><em>session</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t&#160;</td>
          <td class="paramname"><em>key_id</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const uint8_t *&#160;</td>
          <td class="paramname"><em>in</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>in_len</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t *&#160;</td>
          <td class="paramname"><em>out</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t *&#160;</td>
          <td class="paramname"><em>out_len</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Sign data using EdDSA. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">session</td><td>Authenticated session to use </td></tr>
    <tr><td class="paramname">key_id</td><td>Object ID of the signing key </td></tr>
    <tr><td class="paramname">in</td><td>Data to sign </td></tr>
    <tr><td class="paramname">in_len</td><td>Length of data to sign </td></tr>
    <tr><td class="paramname">out</td><td>Signed data </td></tr>
    <tr><td class="paramname">out_len</td><td>Length of signed data</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a405155512dc2284dc210ed15be1d0815" title="Returned value when function was successful. ">YHR_SUCCESS</a> if successful. <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a731b3992b45fde61b6760d92de4dbbf5" title="Returned value when an argument to a function is invalid. ">YHR_INVALID_PARAMETERS</a> input parameters are NULL or if <code>in_len</code> is bigger than YH_MSG_BUF_SIZE-2. See <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366" title="Return codes. ">yh_rc</a> for other possible errors </dd></dl>

</div>
</div>
<a id="a9000d43fe8cf7313b319f316521eb0c4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9000d43fe8cf7313b319f316521eb0c4">&#9670;&nbsp;</a></span>yh_util_sign_hmac()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a> yh_util_sign_hmac </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="yubihsm_8h.html#aa3420d8ccc1fb0b0dee1af5a53cc79de">yh_session</a> *&#160;</td>
          <td class="paramname"><em>session</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t&#160;</td>
          <td class="paramname"><em>key_id</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const uint8_t *&#160;</td>
          <td class="paramname"><em>in</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>in_len</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t *&#160;</td>
          <td class="paramname"><em>out</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t *&#160;</td>
          <td class="paramname"><em>out_len</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Sign data using HMAC. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">session</td><td>Authenticated session to use </td></tr>
    <tr><td class="paramname">key_id</td><td>Object ID of the signing key </td></tr>
    <tr><td class="paramname">in</td><td>Data to HMAC </td></tr>
    <tr><td class="paramname">in_len</td><td>Length of data to hmac </td></tr>
    <tr><td class="paramname">out</td><td>HMAC </td></tr>
    <tr><td class="paramname">out_len</td><td>Length of HMAC</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a405155512dc2284dc210ed15be1d0815" title="Returned value when function was successful. ">YHR_SUCCESS</a> if successful. <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a731b3992b45fde61b6760d92de4dbbf5" title="Returned value when an argument to a function is invalid. ">YHR_INVALID_PARAMETERS</a> input parameters are NULL or if <code>in_len</code> is bigger than YH_MSG_BUF_SIZE-2. See <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366" title="Return codes. ">yh_rc</a> for other possible errors </dd></dl>

</div>
</div>
<a id="aa0a7644b7b368d6aaf8b4aff5e3d19b8"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa0a7644b7b368d6aaf8b4aff5e3d19b8">&#9670;&nbsp;</a></span>yh_util_sign_pkcs1v1_5()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a> yh_util_sign_pkcs1v1_5 </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="yubihsm_8h.html#aa3420d8ccc1fb0b0dee1af5a53cc79de">yh_session</a> *&#160;</td>
          <td class="paramname"><em>session</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t&#160;</td>
          <td class="paramname"><em>key_id</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>hashed</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const uint8_t *&#160;</td>
          <td class="paramname"><em>in</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>in_len</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t *&#160;</td>
          <td class="paramname"><em>out</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t *&#160;</td>
          <td class="paramname"><em>out_len</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Sign data using RSA-PKCS#1v1.5. </p>
<p><code>in</code> is either a raw hashed message (sha1, sha256, sha384 or sha512) or that with correct digestinfo pre-pended</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">session</td><td>Authenticated session to use </td></tr>
    <tr><td class="paramname">key_id</td><td>Object ID of the signing key </td></tr>
    <tr><td class="paramname">hashed</td><td>true if data is only hashed </td></tr>
    <tr><td class="paramname">in</td><td>data to sign </td></tr>
    <tr><td class="paramname">in_len</td><td>length of data to sign </td></tr>
    <tr><td class="paramname">out</td><td>signed data </td></tr>
    <tr><td class="paramname">out_len</td><td>length of signed data</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a405155512dc2284dc210ed15be1d0815" title="Returned value when function was successful. ">YHR_SUCCESS</a> if successful. <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a731b3992b45fde61b6760d92de4dbbf5" title="Returned value when an argument to a function is invalid. ">YHR_INVALID_PARAMETERS</a> input parameters are NULL or if <code>in_len</code> is not 20, 34, 48 or 64. See <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366" title="Return codes. ">yh_rc</a> for other possible errors </dd></dl>

</div>
</div>
<a id="a944e6f31487857709f032598fd43fef5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a944e6f31487857709f032598fd43fef5">&#9670;&nbsp;</a></span>yh_util_sign_pss()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a> yh_util_sign_pss </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="yubihsm_8h.html#aa3420d8ccc1fb0b0dee1af5a53cc79de">yh_session</a> *&#160;</td>
          <td class="paramname"><em>session</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t&#160;</td>
          <td class="paramname"><em>key_id</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const uint8_t *&#160;</td>
          <td class="paramname"><em>in</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>in_len</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t *&#160;</td>
          <td class="paramname"><em>out</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t *&#160;</td>
          <td class="paramname"><em>out_len</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>salt_len</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55ca">yh_algorithm</a>&#160;</td>
          <td class="paramname"><em>mgf1Algo</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Sign data using RSA-PSS. </p>
<p><code>in</code> is a raw hashed message (sha1, sha256, sha384 or sha512)</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">session</td><td>Authenticated session to use </td></tr>
    <tr><td class="paramname">key_id</td><td>Object ID of the signing key </td></tr>
    <tr><td class="paramname">in</td><td>Data to sign </td></tr>
    <tr><td class="paramname">in_len</td><td>Length of data to sign </td></tr>
    <tr><td class="paramname">out</td><td>Signed data </td></tr>
    <tr><td class="paramname">out_len</td><td>Length of signed data </td></tr>
    <tr><td class="paramname">salt_len</td><td>Length of salt </td></tr>
    <tr><td class="paramname">mgf1Algo</td><td>Algorithm for mgf1 (mask generation function for PSS)</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a405155512dc2284dc210ed15be1d0815" title="Returned value when function was successful. ">YHR_SUCCESS</a> if successful. <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a731b3992b45fde61b6760d92de4dbbf5" title="Returned value when an argument to a function is invalid. ">YHR_INVALID_PARAMETERS</a> input parameters are NULL or if <code>in_len</code> is not 20, 34, 48 or 64. See <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366" title="Return codes. ">yh_rc</a> for other possible errors</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a href="https://tools.ietf.org/html/rfc8017#section-9.1">PSS specifications</a> </dd></dl>

</div>
</div>
<a id="a45c32b993856be818a70c0ffad589cbd"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a45c32b993856be818a70c0ffad589cbd">&#9670;&nbsp;</a></span>yh_util_sign_ssh_certificate()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a> yh_util_sign_ssh_certificate </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="yubihsm_8h.html#aa3420d8ccc1fb0b0dee1af5a53cc79de">yh_session</a> *&#160;</td>
          <td class="paramname"><em>session</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t&#160;</td>
          <td class="paramname"><em>key_id</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t&#160;</td>
          <td class="paramname"><em>template_id</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="yubihsm_8h.html#a498937b5a72accbb0ef21bb1dcdd55ca">yh_algorithm</a>&#160;</td>
          <td class="paramname"><em>sig_algo</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const uint8_t *&#160;</td>
          <td class="paramname"><em>in</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>in_len</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t *&#160;</td>
          <td class="paramname"><em>out</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t *&#160;</td>
          <td class="paramname"><em>out_len</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Sign an SSH Certificate request. </p>
<p>The function produces a signature that can then be used to produce the SSH Certificate</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">session</td><td>Authenticated session to use </td></tr>
    <tr><td class="paramname">key_id</td><td>Object ID of the key used to sign the request </td></tr>
    <tr><td class="paramname">template_id</td><td>Object ID of the template to use as a certificate template </td></tr>
    <tr><td class="paramname">sig_algo</td><td>Signature algorithm to use to sign the certificate request </td></tr>
    <tr><td class="paramname">in</td><td>Certificate request </td></tr>
    <tr><td class="paramname">in_len</td><td>Length of the certificate request </td></tr>
    <tr><td class="paramname">out</td><td>Signature </td></tr>
    <tr><td class="paramname">out_len</td><td>Length of the signature</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a405155512dc2284dc210ed15be1d0815" title="Returned value when function was successful. ">YHR_SUCCESS</a> if successful. <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a731b3992b45fde61b6760d92de4dbbf5" title="Returned value when an argument to a function is invalid. ">YHR_INVALID_PARAMETERS</a> if input parameters are NULL or <code>in_len</code> is too big. See <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366" title="Return codes. ">yh_rc</a> for other possible errors </dd></dl>

</div>
</div>
<a id="a550567a0f56d8536b9b5f34e905da7ec"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a550567a0f56d8536b9b5f34e905da7ec">&#9670;&nbsp;</a></span>yh_util_unwrap_data()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a> yh_util_unwrap_data </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="yubihsm_8h.html#aa3420d8ccc1fb0b0dee1af5a53cc79de">yh_session</a> *&#160;</td>
          <td class="paramname"><em>session</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t&#160;</td>
          <td class="paramname"><em>key_id</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const uint8_t *&#160;</td>
          <td class="paramname"><em>in</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>in_len</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t *&#160;</td>
          <td class="paramname"><em>out</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t *&#160;</td>
          <td class="paramname"><em>out_len</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Decrypt (unwrap) data using a <a class="el" href="yubihsm_8h.html#a2fe39512cb4df34b270a67dbb8e13583a16f0118db1dac3d0732e7d66630e1dba" title="Wrap Key is a secret key used to wrap and unwrap Objects during the export and import process...">YH_WRAP_KEY</a>. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">session</td><td>Authenticated session to use </td></tr>
    <tr><td class="paramname">key_id</td><td>Object ID of the Wrap Key to use </td></tr>
    <tr><td class="paramname">in</td><td>Wrapped data </td></tr>
    <tr><td class="paramname">in_len</td><td>Length of wrapped data </td></tr>
    <tr><td class="paramname">out</td><td>Unwrapped data </td></tr>
    <tr><td class="paramname">out_len</td><td>Length of unwrapped data</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a405155512dc2284dc210ed15be1d0815" title="Returned value when function was successful. ">YHR_SUCCESS</a> if successful. <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a731b3992b45fde61b6760d92de4dbbf5" title="Returned value when an argument to a function is invalid. ">YHR_INVALID_PARAMETERS</a> if input parameters are NULL or if <code>in_len</code> is too big. See <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366" title="Return codes. ">yh_rc</a> for other possible errors </dd></dl>

</div>
</div>
<a id="ab37ae2f7fc6857b420e173284130686d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab37ae2f7fc6857b420e173284130686d">&#9670;&nbsp;</a></span>yh_util_verify_hmac()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a> yh_util_verify_hmac </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="yubihsm_8h.html#aa3420d8ccc1fb0b0dee1af5a53cc79de">yh_session</a> *&#160;</td>
          <td class="paramname"><em>session</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t&#160;</td>
          <td class="paramname"><em>key_id</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const uint8_t *&#160;</td>
          <td class="paramname"><em>signature</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>signature_len</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const uint8_t *&#160;</td>
          <td class="paramname"><em>data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>data_len</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool *&#160;</td>
          <td class="paramname"><em>verified</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Verify a generated HMAC. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">session</td><td>Authenticated session to use </td></tr>
    <tr><td class="paramname">key_id</td><td>Object ID of the HMAC key </td></tr>
    <tr><td class="paramname">signature</td><td>HMAC signature (20, 32, 48 or 64 bytes) </td></tr>
    <tr><td class="paramname">signature_len</td><td>length of HMAC signature </td></tr>
    <tr><td class="paramname">data</td><td>data to verify </td></tr>
    <tr><td class="paramname">data_len</td><td>length of data to verify </td></tr>
    <tr><td class="paramname">verified</td><td>true if verification succeeded</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a405155512dc2284dc210ed15be1d0815" title="Returned value when function was successful. ">YHR_SUCCESS</a> if successful. <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a731b3992b45fde61b6760d92de4dbbf5" title="Returned value when an argument to a function is invalid. ">YHR_INVALID_PARAMETERS</a> input parameters are NULL or if <code>signature_len</code> + <code>data_len</code> is too long. See <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366" title="Return codes. ">yh_rc</a> for other possible errors </dd></dl>

</div>
</div>
<a id="a7c2e101be04ad1546d99d5600e732eca"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7c2e101be04ad1546d99d5600e732eca">&#9670;&nbsp;</a></span>yh_util_wrap_data()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366">yh_rc</a> yh_util_wrap_data </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="yubihsm_8h.html#aa3420d8ccc1fb0b0dee1af5a53cc79de">yh_session</a> *&#160;</td>
          <td class="paramname"><em>session</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint16_t&#160;</td>
          <td class="paramname"><em>key_id</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const uint8_t *&#160;</td>
          <td class="paramname"><em>in</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>in_len</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint8_t *&#160;</td>
          <td class="paramname"><em>out</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t *&#160;</td>
          <td class="paramname"><em>out_len</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Encrypt (wrap) data using a <a class="el" href="yubihsm_8h.html#a2fe39512cb4df34b270a67dbb8e13583a16f0118db1dac3d0732e7d66630e1dba" title="Wrap Key is a secret key used to wrap and unwrap Objects during the export and import process...">YH_WRAP_KEY</a>. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">session</td><td>Authenticated session to use </td></tr>
    <tr><td class="paramname">key_id</td><td>Object ID of the Wrap Key to use </td></tr>
    <tr><td class="paramname">in</td><td>Data to wrap </td></tr>
    <tr><td class="paramname">in_len</td><td>Length of data to wrap </td></tr>
    <tr><td class="paramname">out</td><td>Wrapped data </td></tr>
    <tr><td class="paramname">out_len</td><td>Length of the wrapped data</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a405155512dc2284dc210ed15be1d0815" title="Returned value when function was successful. ">YHR_SUCCESS</a> if successful. <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366a731b3992b45fde61b6760d92de4dbbf5" title="Returned value when an argument to a function is invalid. ">YHR_INVALID_PARAMETERS</a> if input parameters are NULL or if <code>in_len</code> is too big. See <a class="el" href="yubihsm_8h.html#ae4f602d2343d01b1727dfd633169d366" title="Return codes. ">yh_rc</a> for other possible errors </dd></dl>

</div>
</div>
<a id="a00b81c3c9ca2964a672b7b0b725925e4"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a00b81c3c9ca2964a672b7b0b725925e4">&#9670;&nbsp;</a></span>yh_verify_logs()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool yh_verify_logs </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structyh__log__entry.html">yh_log_entry</a> *&#160;</td>
          <td class="paramname"><em>logs</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>n_items</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structyh__log__entry.html">yh_log_entry</a> *&#160;</td>
          <td class="paramname"><em>last_previous_log</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Verify an array of log entries. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">logs</td><td>Array of log entries </td></tr>
    <tr><td class="paramname">n_items</td><td>number of log entries </td></tr>
    <tr><td class="paramname">last_previous_log</td><td>Optional pointer to the entry before the first entry in logs</td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>True if verification succeeds. False otherwise</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a href="https://developers.yubico.com/YubiHSM2/Concepts/Logs.html">Logs</a> </dd></dl>

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.13
</small></address>
</body>
</html>
